Add some testing scripts

This commit is contained in:
2023-09-16 01:32:53 -03:00
parent c997a29967
commit 07116018ec
11 changed files with 70 additions and 3 deletions

View 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])"

View File

@ -0,0 +1,5 @@
cd ~/build/"$1"/ || exit
mkdir build
cd build || exit
cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" ../
make

View File

@ -0,0 +1 @@
ssh -t ishoebot@remotelabm35.cs.unb.ca "~/build/$($args[0])/build/$($args[0])"

View File

@ -0,0 +1 @@
ssh ishoebot@remotelabm35.cs.unb.ca "cd ~/build/$($args[0])/tests/; chmod +x test.sh; ./test.sh $($args[0])"

View File

@ -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"