Improve test make-target logic

- make runtests if no valid test-results target exists
(closes #41)
This commit is contained in:
Ralph Lange
2020-05-26 17:32:20 +02:00
parent bb9b59156c
commit 55038b7315
2 changed files with 8 additions and 5 deletions

View File

@@ -575,9 +575,11 @@ def build(args):
def test(args):
setup_for_build(args)
print('{0}Running the main module tests{1}'.format(ANSI_YELLOW, ANSI_RESET))
call_make(['tapfiles'])
if has_test_results:
call_make(['tapfiles'])
call_make(['test-results'], parallel=0, silent=True)
else:
call_make(['runtests'])
def doExec(args):
'exec user command with vcvars'

View File

@@ -36,11 +36,12 @@ ret=0
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles || ret=$?
if grep -q "BASE_3_14=NO" $EPICS_BASE/configure/CONFIG_BASE_VERSION
if grep -q "BASE_3_14\s*=\s*NO" $EPICS_BASE/configure/CONFIG_BASE_VERSION && grep -q "^test-results:" $EPICS_BASE/configure/RULES_BUILD
then
grep -q "^test-results:" $EPICS_BASE/configure/RULES_BUILD && make -sk test-results
make -j2 tapfiles || ret=$?
make -sk test-results
else
make runtests
fi
fi