-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Delete unused yml file * Reorganize and tidy `ci.yml` * Change compilation flags and add switch for code coverage flags * Fix and consolidate .gitignore files * Remove logfile printout * Separate testing setup from main `Makefile` * Update `make clean` * Tidy makefiles
- Loading branch information
Showing
9 changed files
with
203 additions
and
153 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Ignore the executable, the Makefile, and the compiler-generated files in this directory | ||
# Ignore the executable, the Makefile, the Python bytecode, and the compiler-generated files | ||
atchem2 | ||
Makefile | ||
*.pyc | ||
*.gcda | ||
*.gcno | ||
*.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# ----------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
# Peter Jimack, Mike Pilling | ||
# | ||
# Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
# | ||
# This file is part of the AtChem2 software package. | ||
# | ||
# This file is covered by the MIT license which can be found in the file | ||
# LICENSE.md at the top level of the AtChem2 distribution. | ||
# | ||
# ----------------------------------------------------------------------------- | ||
|
||
# This is a secondary makefile, included in the main Makefile. It contains | ||
# the information needed to set up and run the AtChem2 Testsuite. | ||
# | ||
# The following variables are defined in the main Makefile: | ||
# - $FRUITDIR is the path to FRUIT, the FORTRAN Unit Test Framework | ||
# - $UNITTEST_SRCS are the Fortran source files needed for the unit tests | ||
# - $FORT_COMP is the Fortran compiler | ||
|
||
|
||
# ==================== Unit tests ==================== # | ||
|
||
# setup FRUIT | ||
UNITTESTDIR = tests/unit_tests | ||
fruit_code = $(FRUITDIR)/src/fruit.f90 | ||
unittest_code = $(UNITTEST_SRCS) $(shell ls tests/unit_tests/*_test.f90 ) | ||
unittest_code_gen = $(UNITTESTDIR)/fruit_basket_gen.f90 $(UNITTESTDIR)/fruit_driver_gen.f90 | ||
all_unittest_code = $(fruit_code) $(unittest_code) $(unittest_code_gen) | ||
fruit_driver = $(UNITTESTDIR)/fruit_driver.exe | ||
|
||
# copy `fruit_generator.rb` to the unit tests directory and replace the | ||
# path to FRUIT with $FRUITDIR | ||
$(UNITTESTDIR)/fruit_basket_gen.f90 : $(unittest_code) | ||
@echo "" | ||
@cp tests/fruit_generator.rb $(UNITTESTDIR) | ||
@cd $(UNITTESTDIR); \ | ||
sed -i "18s,.*,load \"$(FRUITDIR)/rake_base.rb\"," fruit_generator.rb; \ | ||
ruby fruit_generator.rb | ||
|
||
# build `fruit_driver.exe` from the individual unit tests | ||
$(fruit_driver) : $(all_unittest_code) | ||
$(FORT_COMP) -o $(fruit_driver) -J$(OBJ) -I$(OBJ) $(all_unittest_code) $(FFLAGS) $(LDFLAGS) | ||
|
||
# ==================== Model tests ==================== # | ||
|
||
# search `tests/tests/` for all subdirectories, which should reflect the full list of tests | ||
OLDTESTS := $(shell ls -d tests/tests/*/ | sed 's,tests/tests/,,g' | sed 's,/,,g') | ||
|
||
# search `tests/model_tests/` for all subdirectories, which should reflect the full list of model tests | ||
MODELTESTDIR = tests/model_tests | ||
MODELTESTS := $(shell ls -d tests/model_tests/*/ | sed 's,tests/model_tests/,,g' | sed 's,/,,g') | ||
|
||
# ==================== Makefile rules ==================== # | ||
|
||
.PHONY: indenttest styletest unittests oldtests modeltests alltests | ||
|
||
indenttest: | ||
@echo "" | ||
@echo "Make: Running the indent test." | ||
@./tests/run_indent_test.sh | ||
|
||
styletest: | ||
@echo "" | ||
@echo "Make: Running the style test." | ||
@./tests/run_style_test.sh | ||
|
||
unittests: $(fruit_driver) | ||
@export DYLD_LIBRARY_PATH=$(FORT_LIB):$(CVODELIBDIR):$(OPENLIBMDIR); $(fruit_driver) | ||
@echo "" | ||
|
||
oldtests: | ||
@echo "" | ||
@echo "Make: Running the old tests:" $(OLDTESTS) | ||
@./tests/run_tests.sh "$(OLDTESTS)" "$(FORT_LIB):$(CVODELIBDIR):$(OPENLIBMDIR)" | ||
|
||
modeltests: | ||
@echo "" | ||
@echo "Make: Running the model tests:" $(MODELTESTS) | ||
@./tests/run_model_tests.sh "$(MODELTESTS)" "$(FORT_LIB):$(CVODELIBDIR):$(OPENLIBMDIR)" | ||
|
||
alltests: indenttest styletest oldtests modeltests unittests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.