mirror of
https://github.com/hasherezade/bearparser
synced 2026-06-08 14:32:38 +00:00
[NOBIN] Added a script for regression tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
build/
|
||||
build_qt5/
|
||||
build_qt4/
|
||||
test_cases/
|
||||
|
||||
|
||||
@@ -36,5 +36,10 @@ if(CMD_BUILD_TESTING)
|
||||
# 0) does the application run
|
||||
add_test (TestRuns ${CMAKE_BINARY_DIR}/bearcommander)
|
||||
set_tests_properties(TestRuns PROPERTIES PASS_REGULAR_EXPRESSION "Bearparser")
|
||||
|
||||
# 1) regression tests for the commander
|
||||
add_test (TestRegression ${CMAKE_SOURCE_DIR}/test.sh ${CMAKE_SOURCE_DIR})
|
||||
set_tests_properties(TestRegression PROPERTIES PASS_REGULAR_EXPRESSION "All passed")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
START_DIR=$(pwd)
|
||||
SOURCE_DIR=$1
|
||||
cd "$SOURCE_DIR"
|
||||
echo "Source Dir: ""$SOURCE_DIR"
|
||||
|
||||
rm -rf test_cases
|
||||
mkdir test_cases
|
||||
cd test_cases
|
||||
wget "https://drive.google.com/uc?export=download&id=1johP6rf7iS8-mi6xrT5mCX4wnbKk8rq8" -O test_cases.zip
|
||||
7z x test_cases.zip
|
||||
rm *.zip
|
||||
cd ..
|
||||
BCMD_DIR=$(pwd)/build/
|
||||
|
||||
cd test_cases
|
||||
chmod +x test1.sh
|
||||
./test1.sh "$BCMD_DIR" "info" "x64/QtGui4"
|
||||
if [[ "$?" != 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
./test1.sh "$BCMD_DIR" "winfo0" "x64/QtGui4"
|
||||
if [[ "$?" != 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
echo "All passed"
|
||||
cd "$START_DIR"
|
||||
Reference in New Issue
Block a user