-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize and layer existing tests
- Loading branch information
1 parent
4ab30c3
commit 5eb0ef2
Showing
11 changed files
with
119 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import platform | ||
import os | ||
|
||
def get_recording_dir(): | ||
if platform.system() == 'Windows': | ||
if os.env("GITHUB_ACTIONS") == "true": | ||
return 'C:\\open-ephys\\data' | ||
else: | ||
os.getenv('OE_RECORD_DIR') | ||
elif platform.system() == 'Linux': | ||
return '<path/to/linux/runner>' # TODO | ||
else: | ||
return '<path/to/Mac/runner>' # TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
import os | ||
import platform | ||
import glob | ||
import pathlib | ||
import time | ||
import platform | ||
|
||
tests = ( | ||
'processor_graph_actions.py', | ||
'get_set_parameters.py', | ||
'basic_acquire.py', | ||
'basic_record.py', | ||
'get_set_recording_info.py', | ||
'config_audio_device.py', | ||
'round_trip_record.py', | ||
'channel_map.py' #TODO: add more plugin specific tests | ||
) | ||
|
||
GHA = os.getenv("GITHUB_ACTIONS") == "true" | ||
|
||
tests = glob.glob(os.path.join(pathlib.Path().absolute(), "tests", "*.py")) | ||
RECORD_PATH = '' | ||
if platform.system() == 'Windows': | ||
if GHA: RECORD_PATH = 'C:\\open-ephys\\data' | ||
else: | ||
pass #define local path here | ||
elif platform.system() == 'Linux': | ||
if GHA: pass #RECORD_PATH = '<path/to/linux/runner>' # TODO | ||
else: | ||
pass #define local path here | ||
else: #macos | ||
if GHA: pass #RECORD_PATH = '<path/to/Mac/runner>' # TODO | ||
else: RECORD_PATH = '/Volumes/T7/test-suite/' | ||
|
||
for test in tests: | ||
print("Running: ", test) | ||
rc = os.system("python " + test + " --mode local --fetch 1") | ||
print("--------------------------------") | ||
print("Running: ", test[:-3]) | ||
print("--------------------------------") | ||
rc = os.system(f"python3 ./tests/{test} --parent_directory {RECORD_PATH}") | ||
if rc != 0: | ||
print("Test failed: ", test) | ||
print("TEST FAILED: ", test) | ||
break | ||
time.sleep(4) | ||
time.sleep(1) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.