Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 209cd41 in mainline


Ignore:
Timestamp:
2018-10-12T15:03:40Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
d4eba6d
Parents:
d09eeb2
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-12 12:24:19)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-12 15:03:40)
Message:

Replace scripts and HTML generated in boot/Makefile with a testrunner app

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile

    rd09eeb2 r209cd41  
    6767        cat "$(USPACE_PATH)/lib/c/arch/$(UARCH)/_link.ld" | sed 's/^STARTUP(.*)$$//g' > "$(DIST_PATH)/inc/_link.ld"
    6868endif
     69
    6970        for app in $(RD_APPS) ; do \
    7071                app_dir="`dirname "$$app"`" ; \
     
    7677                cp "$$file" "$(DIST_PATH)/" ; \
    7778        done
     79
    7880ifeq ($(CONFIG_PCUT_TESTS),y)
    79         echo "echo Running all tests..." >"$(DIST_PATH)/test/run_all"
    80         echo "<html><head><title>HelenOS test results</title></head><body>" >"$(DIST_PATH)/test/test.html"
    81         echo "<h1>HelenOS test results</h1><ul>" >>"$(DIST_PATH)/test/test.html"
    8281        for file in $(RD_TESTS) ; do \
    83                 file2=`basename $$file`; \
    8482                cp "$$file" "$(DIST_PATH)/test/" ; \
    85                 echo "echo ' ->' $$file2" >>"$(DIST_PATH)/test/run_all"; \
    86                 echo "/test/$$file2 | to /test/$$file2.out" >>"$(DIST_PATH)/test/run_all"; \
    87                 echo "cat /test/$$file2.out" >>"$(DIST_PATH)/test/run_all"; \
    88                 echo "cp -f /test/$$file2.out /data/web/result-$$file2.txt" >>"$(DIST_PATH)/test/run_all"; \
    89                 echo "<li><a href=\"result-$$file2.txt\">$$file2</a></li>" >>"$(DIST_PATH)/test/test.html"; \
    9083        done
    91         echo "cp -f /test/test.html /data/web/test.html" >>"$(DIST_PATH)/test/run_all"
    92         echo "</ul></body></html>" >>"$(DIST_PATH)/test/test.html"
    9384endif
    9485
    9586ifeq ($(CONFIG_PCUT_SELF_TESTS),y)
    96         echo "echo Running all PCUT self-tests..." >"$(DIST_PATH)/test/run_pcut"
    97         echo "<html><head><title>Results of PCUT self-tests on HelenOS</title></head><body>" >"$(DIST_PATH)/test/pcut.html"
    98         echo "<h1>Results of PCUT self-tests on HelenOS</h1><ul>" >>"$(DIST_PATH)/test/pcut.html"
    9987        for file in $(USPACE_PATH)/lib/pcut/test-libpcut-*; do \
    100                 file2=`basename $$file`; \
    101                 name=`echo "$$file2" | sed 's/test-libpcut-//'`; \
    10288                cp "$$file" "$(DIST_PATH)/test/" ; \
    103                 echo "echo ' ->' $$name" >>"$(DIST_PATH)/test/run_pcut"; \
    104                 echo "/test/$$file2 | to /test/$$file2.out" >>"$(DIST_PATH)/test/run_pcut"; \
    105                 echo "cat /test/$$file2.out" >>"$(DIST_PATH)/test/run_pcut"; \
    106                 echo "cp -f /test/$$file2.out /data/web/result-$$file2.txt" >>"$(DIST_PATH)/test/run_pcut"; \
    107                 echo "<li><a href=\"result-$$file2.txt\">$$name</a></li>" >>"$(DIST_PATH)/test/pcut.html"; \
    10889        done
    109         echo "cp -f /test/pcut.html /data/web/pcut.html" >>"$(DIST_PATH)/test/run_pcut"
    110         echo "</ul></body></html>" >>"$(DIST_PATH)/test/pcut.html"
    11190endif
    11291
  • boot/Makefile.common

    rd09eeb2 r209cd41  
    198198        tester \
    199199        testread \
     200        testrunner \
    200201        testwrit \
    201202        tetris \
  • uspace/Makefile

    rd09eeb2 r209cd41  
    7474        app/tester \
    7575        app/testread \
     76        app/testrunner \
    7677        app/testwrit \
    7778        app/tetris \
  • uspace/app/tester/tester.c

    rd09eeb2 r209cd41  
    9393}
    9494
    95 static void run_safe_tests(void)
     95static int run_safe_tests(void)
    9696{
    9797        test_t *test;
     
    131131        if (failed_names)
    132132                printf("Failed tests: %s\n", failed_names);
     133
     134        return n;
    133135}
    134136
     
    171173
    172174        if (str_cmp(argv[1], "*") == 0) {
    173                 run_safe_tests();
    174                 return 0;
     175                return run_safe_tests();
    175176        }
    176177
Note: See TracChangeset for help on using the changeset viewer.