Add some testing scripts
This commit is contained in:
3
Assignment1/tests/build.ps1
Normal file
3
Assignment1/tests/build.ps1
Normal file
@ -0,0 +1,3 @@
|
||||
ssh ishoebot@remotelabm35.cs.unb.ca "cd ~/build/; rm -rf $($args[0]); mkdir $($args[0])"
|
||||
scp -r $(Get-Location) ishoebot@remotelabm35.cs.unb.ca:~/build/
|
||||
ssh ishoebot@remotelabm35.cs.unb.ca "cd ~/build/$($args[0])/; rm -rf build/; chmod +x ./tests/build.sh; ./tests/build.sh $($args[0])"
|
5
Assignment1/tests/build.sh
Normal file
5
Assignment1/tests/build.sh
Normal file
@ -0,0 +1,5 @@
|
||||
cd ~/build/"$1"/ || exit
|
||||
mkdir build
|
||||
cd build || exit
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" ../
|
||||
make
|
1
Assignment1/tests/run.ps1
Normal file
1
Assignment1/tests/run.ps1
Normal file
@ -0,0 +1 @@
|
||||
ssh -t ishoebot@remotelabm35.cs.unb.ca "~/build/$($args[0])/build/$($args[0])"
|
1
Assignment1/tests/test.ps1
Normal file
1
Assignment1/tests/test.ps1
Normal file
@ -0,0 +1 @@
|
||||
ssh ishoebot@remotelabm35.cs.unb.ca "cd ~/build/$($args[0])/tests/; chmod +x test.sh; ./test.sh $($args[0])"
|
@ -19,7 +19,7 @@ function test() {
|
||||
# Check if the files exist and if not, create them
|
||||
files "$1"
|
||||
|
||||
../cmake-build-debug-wsl/Assignment1 < "$1.txt" > "$1_Result.txt"
|
||||
"$(pwd)"/../build/Assignment1 < "$1.txt" > "$1_Result.txt"
|
||||
if diff -u "$1_Result.txt" "$1_Expected.txt";
|
||||
then
|
||||
echo "$1 test passed"
|
||||
|
Reference in New Issue
Block a user