Skip to content

Commit 41f2442

Browse files
committed
Allow quick testing (unit tests only)
1 parent 33c3560 commit 41f2442

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

runtests.sh

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,23 @@ DRIVER_HOME=$(dirname $0)
2121

2222
NEORUN_OPTIONS=""
2323
RUNNING=0
24+
QUICK=0
2425
KNOWN_HOSTS="${HOME}/.neo4j/known_hosts"
2526
KNOWN_HOSTS_BACKUP="${KNOWN_HOSTS}.backup"
2627

2728
FG_BRIGHT_RED='\033[1;31m'
2829
FG_DEFAULT='\033[0m'
2930

3031
# Parse options
31-
while getopts ":dr" OPTION
32+
while getopts ":dqr" OPTION
3233
do
3334
case ${OPTION} in
3435
d)
3536
NEORUN_OPTIONS="-f"
3637
;;
38+
q)
39+
QUICK=1
40+
;;
3741
r)
3842
RUNNING=1
3943
;;
@@ -79,34 +83,33 @@ echo ""
7983

8084
TEST_RUNNER="coverage run -m ${UNITTEST} discover -vfs ${TEST}"
8185
EXAMPLES_RUNNER="coverage run -m ${UNITTEST} discover -vfs examples"
82-
BEHAVE_RUNNER="behave --tags=-db --tags=-in_dev --tags=-streaming_and_cursor_navigation test/tck"
86+
BEHAVE_RUNNER="behave --tags=-db --tags=-in_dev test/tck"
8387

8488
if [ ${RUNNING} -eq 1 ]
8589
then
8690
${TEST_RUNNER}
8791
check_exit_status $?
8892
else
89-
#echo "Updating password"
90-
#mv ${KNOWN_HOSTS} ${KNOWN_HOSTS_BACKUP}
91-
#neokit/neorun ${NEORUN_OPTIONS} "python -m test.auth password" ${VERSIONS}
92-
#EXIT_STATUS=$?
93-
#mv ${KNOWN_HOSTS_BACKUP} ${KNOWN_HOSTS}
94-
#check_exit_status ${EXIT_STATUS}
9593
export NEO4J_PASSWORD="password"
9694

9795
echo "Running unit tests"
9896
neokit/neorun ${NEORUN_OPTIONS} "${TEST_RUNNER}" ${VERSIONS}
9997
check_exit_status $?
10098

101-
echo "Testing example code"
102-
neokit/neorun ${NEORUN_OPTIONS} "${EXAMPLES_RUNNER}" ${VERSIONS}
103-
check_exit_status $?
99+
if [ ${QUICK} -eq 0 ]
100+
then
101+
echo "Testing example code"
102+
neokit/neorun ${NEORUN_OPTIONS} "${EXAMPLES_RUNNER}" ${VERSIONS}
103+
check_exit_status $?
104+
105+
echo "Testing TCK"
106+
coverage report --show-missing
107+
python -c 'from test.tck.configure_feature_files import *; set_up()'
108+
echo "Feature files downloaded"
109+
neokit/neorun ${NEORUN_OPTIONS} "${BEHAVE_RUNNER}" ${VERSIONS}
110+
python -c 'from test.tck.configure_feature_files import *; clean_up()'
111+
echo "Feature files removed"
104112

105-
coverage report --show-missing
106-
python -c 'from test.tck.configure_feature_files import *; set_up()'
107-
echo "Feature files downloaded"
108-
neokit/neorun ${NEORUN_OPTIONS} "${BEHAVE_RUNNER}" ${VERSIONS}
109-
python -c 'from test.tck.configure_feature_files import *; clean_up()'
110-
echo "Feature files removed"
113+
fi
111114

112115
fi

0 commit comments

Comments
 (0)