mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-10 11:47:38 +02:00
testing: Enable automatic selection of the OS image based on the test and filename prefix, addressing an issue in the development environment.
For example, when using VSCode with pytest, test autodiscovery triggers pytest_generate_tests(), adding all images to each test case. This causes issues, as Linux tests end up being executed with Windows and Mac images, and vice versa.
This commit is contained in:
@@ -25,10 +25,13 @@ jobs:
|
||||
|
||||
- name: Download images
|
||||
run: |
|
||||
mkdir test_images
|
||||
cd test_images
|
||||
curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz"
|
||||
gunzip linux-sample-1.bin.gz
|
||||
curl -sLO "https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz"
|
||||
gunzip win-xp-laptop-2005-06-25.img.gz
|
||||
cd -
|
||||
|
||||
- name: Download and Extract symbols
|
||||
run: |
|
||||
@@ -39,13 +42,12 @@ jobs:
|
||||
|
||||
- name: Testing...
|
||||
run: |
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image win-xp-laptop-2005-06-25.img -k test_windows -v
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image linux-sample-1.bin -k test_linux -v
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image-dir=./test_images -k test_windows -v
|
||||
pytest ./test/test_volatility.py --volatility=vol.py --image-dir=./test_images -k test_linux -v
|
||||
|
||||
- name: Clean up post-test
|
||||
run: |
|
||||
rm -rf *.bin
|
||||
rm -rf *.img
|
||||
rm -rf test_images
|
||||
cd volatility3/symbols
|
||||
rm -rf linux
|
||||
rm -rf linux.zip
|
||||
|
||||
Reference in New Issue
Block a user