-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
2,502 additions
and
559 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 |
---|---|---|
|
@@ -361,4 +361,5 @@ MigrationBackup/ | |
# Fody - auto-generated XML schema | ||
FodyWeavers.xsd | ||
|
||
*.test.eel2 | ||
*.test.eel2 | ||
*.test |
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,16 @@ | ||
function process_eel_script { | ||
local input_script="$1" | ||
local output_script="$2" | ||
local replace_str="$3" # New argument for the replacement | ||
|
||
# Process the second script and append its contents to the output script | ||
sed -r -e "s/\/\/IF${replace_str}|\/\*IF${replace_str}\{|\}IF${replace_str}\*\///" \ | ||
"$input_script" > "$output_script" | ||
} | ||
|
||
process_eel_script vocalrediso.jsfx-template vocalrediso.test TEST | ||
process_eel_script vocalrediso.jsfx-template vocalrediso.eel EEL | ||
process_eel_script vocalrediso.jsfx-template vocalrediso.jsfx JSFX | ||
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.test TEST | ||
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.eel EEL | ||
process_eel_script vocalredisoBlurry.jsfx-template vocalredisoBlurry.jsfx JSFX |
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,44 +1,32 @@ | ||
cat testing_defines.eel2 > vocalrediso.test.eel2 | ||
sed -r -e 's/^(desc|slider[0-9]+):.*|^@(init|slider|block|serialize|sample)//' \ | ||
-e 's/\/\/DEBUGPRINT/printf/' \ | ||
-e 's/\/\/IFTEST|\/\*IFTEST\{\*|\*\}IFTEST\*\///' \ | ||
-e 's/\*IFNTEST\*|IFNTEST\{\*|\*\}IFNTEST//' \ | ||
vocalrediso-jamesdsp.eel >> vocalrediso.test.eel2 | ||
|
||
# Initialize a flag to indicate stderr output | ||
stderr_output=0 | ||
|
||
output=$(./WDL/WDL/eel2/loose_eel ./vocalrediso.test.eel2 2>&1) | ||
|
||
echo "$output" | ||
|
||
# Get the last line of the output | ||
last_line=$(echo "$output" | tail -n 1) | ||
|
||
# Check if the last line starts with 'FAILURE' | ||
if echo "$last_line" | grep -q "^FAILURE"; then | ||
echo "Failed Test Cases, will return -1!" | ||
exit -1 | ||
fi | ||
|
||
##//DEBUGPRINT("HI"); | ||
##//IFTEST code_here(); | ||
##/*IFTEST{* | ||
## more_code(); | ||
##*}IFTEST*/ | ||
##/*IFNTEST*/called_when_not_testing(); | ||
##/*IFNTEST{*/ | ||
## also_called_when_not_testing(); | ||
##/*}IFNTEST*/ | ||
|
||
# will transform to | ||
|
||
##printf("HI"); | ||
## code_here(); | ||
## | ||
## more_code(); | ||
## | ||
##//called_when_not_testing(); | ||
##/*IFNTEST{*/ | ||
## also_called_when_not_testing(); | ||
##/*IFNTEST}*/ | ||
# ensure latest testing script is available | ||
./process_scripts.sh | ||
|
||
# add defines to head of test script | ||
cat testing_defines.eel2 vocalrediso.test > vocalrediso.test.eel2 | ||
|
||
function run_test { | ||
local test_script="$1" | ||
local test_output | ||
|
||
echo "TESTING $1" | ||
|
||
# Ensure latest testing script is available | ||
./process_scripts.sh | ||
|
||
# Add defines to head of test script | ||
cat testing_defines.eel2 "$test_script" > "${test_script}.eel2" | ||
|
||
# Run the test and capture output | ||
test_output=$(./WDL/WDL/eel2/loose_eel "./${test_script}.eel2" 2>&1) | ||
echo "$test_output" | ||
|
||
# Get the last line of the output and check for failure | ||
if echo "$test_output" | tail -n 1 | grep -q "^FAILURE"; then | ||
echo "Failed Test Cases, will return -1!" | ||
exit -1 | ||
fi | ||
} | ||
|
||
# Run tests for each script | ||
run_test vocalrediso.test | ||
run_test vocalredisoBlurry.test |
Oops, something went wrong.