Skip to content

Commit 0da0158

Browse files
author
Aye Min Aung
committed
make testtime.c passes and fix the artifact path
1 parent 822fd33 commit 0da0158

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

run_tests.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ make -j`nproc --all` |& tee ./unit-tests-build-result.txt
1010
exitstatus=${PIPESTATUS[0]}
1111
echo $exitstatus > ./build-status.txt
1212
echo 0 > tests/unit/run-tests-status.txt
13-
env CTEST_OUTPUT_ON_FAILURE=1 make test |& tee >(ansi2html > ./tests/unit/logs/artifacts.html)
13+
export TEST_ARTIFACT_FILE=/__w/libks/libks/tests/unit/logs/artifacts.html
14+
env CTEST_OUTPUT_ON_FAILURE=1 make test |& tee >(ansi2html > $TEST_ARTIFACT_FILE)
1415
exitstatus=${PIPESTATUS[0]}
1516
ls -al
1617
ls -al tests/unit/logs
1718

1819
echo "Exist status is $exitstatus"
1920

2021
if [ "$exitstatus" != "0" ]]; then
21-
echo "TEST_ARTIFACT_FILE=/__sw/libks/libks/tests/unitlogs/artifacts.html" >> $GITHUB_OUTPUT
22+
echo "TEST_ARTIFACT_FILE=$TEST_ARTIFACT_FILE" >> $GITHUB_OUTPUT
2223
fi
2324

2425
exit $exitstatus

tests/testtime.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ int main(int argc, char **argv)
6060
/* the clock on osx seems to be particularly bad at being accurate, we need a bit more room for error*/
6161
ok( diff > 1900 && diff < 2500 );
6262
#else
63-
// ok( diff > 1950 && diff < 2050 );
64-
// NOTE: uncomment the line above and delete the line below, only did this to test failure.
65-
ok(diff == 0);
63+
ok( diff > 1950 && diff < 2050 );
6664
#endif
6765
ks_shutdown();
6866
done_testing();

0 commit comments

Comments
 (0)