Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 648

Show
Ignore:
Timestamp:
08/29/10 07:20:23 (14 years ago)
Author:
braddr
Message:

Add fully scripted tests.. the oddballs that just are easier to do as one off sh files

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/Makefile

    r641 r648  
    2525#                        default: (none) 
    2626# 
    2727#   EXTRA_SOURCES:       list of extra files to build and link along with the test 
    2828#                        default: (none) 
    2929# 
    3030#   PERMUTE_ARGS:        the set of arguments to permute in multiple $(DMD) invocations 
    3131#                        default: the make variable ARGS (see below) 
    3232# 
    3333#   POST_SCRIPT:         name of script to execute after test run 
    3434#                        default: (none) 
    3535# 
    3636#   REQUIRED_ARGS:       arguments to add to the $(DMD) command line 
    3737#                        default: (none) 
    3838 
    3939SHELL=/bin/bash 
    4040QUIET=@ 
    4141export DMD=../src/dmd 
    4242export RESULTS_DIR=test_results 
    4343export ARGS=-inline -release -gc -O -unittest -fPIC 
    4444 
    45 runnable_tests=$(wildcard runnable/*.d) $(wildcard runnable/*.html) 
     45runnable_tests=$(wildcard runnable/*.d) $(wildcard runnable/*.html) $(wildcard runnable/*.sh) 
    4646runnable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(runnable_tests))) 
    4747 
    4848compilable_tests=$(wildcard compilable/*.d) 
    4949compilable_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(compilable_tests))) 
    5050 
    5151fail_compilation_tests=$(wildcard fail_compilation/*.d) 
    5252fail_compilation_test_results=$(addsuffix .out,$(addprefix $(RESULTS_DIR)/,$(fail_compilation_tests))) 
    5353 
    5454$(RESULTS_DIR)/runnable/%.d.out: runnable/%.d $(RESULTS_DIR)/.created $(RESULTS_DIR)/combinations $(DMD) 
    5555    $(QUIET) ./do_test.sh $(<D) $* d 
    5656 
    5757$(RESULTS_DIR)/runnable/%.html.out: runnable/%.html $(RESULTS_DIR)/.created $(RESULTS_DIR)/combinations $(DMD) 
    5858    $(QUIET) ./do_test.sh $(<D) $* html 
     59 
     60$(RESULTS_DIR)/runnable/%.sh.out: runnable/%.sh $(RESULTS_DIR)/.created $(RESULTS_DIR)/combinations $(DMD) 
     61    $(QUIET) echo " ... $(<D)/$*.sh" 
     62    $(QUIET) ./$(<D)/$*.sh 
    5963 
    6064$(RESULTS_DIR)/compilable/%.d.out: compilable/%.d $(RESULTS_DIR)/.created $(RESULTS_DIR)/combinations $(DMD) 
    6165    $(QUIET) ./do_test.sh $(<D) $* d 
    6266 
    6367$(RESULTS_DIR)/fail_compilation/%.d.out: fail_compilation/%.d $(RESULTS_DIR)/.created $(RESULTS_DIR)/combinations $(DMD) 
    6468    $(QUIET) ./do_test.sh $(<D) $* d 
    6569 
    6670all: run_tests 
    6771 
    6872quick: 
    6973    $(MAKE) ARGS="" run_tests 
    7074 
    7175clean: 
    7276    @echo "Removing output directory: $(RESULTS_DIR)" 
    7377    $(QUIET)if [ -e $(RESULTS_DIR) ]; then rm -rf $(RESULTS_DIR); fi 
    7478 
    7579$(RESULTS_DIR)/.created: 
    7680    @echo Creating output directory: $(RESULTS_DIR)  
    7781    $(QUIET)if [ ! -d $(RESULTS_DIR) ]; then mkdir $(RESULTS_DIR); fi 
    7882    $(QUIET)if [ ! -d $(RESULTS_DIR)/runnable ]; then mkdir $(RESULTS_DIR)/runnable; fi