Commit ded6969b authored by Sylvain Soliman's avatar Sylvain Soliman

separate slow and unit tests

parent 887cc31b
......@@ -22,12 +22,14 @@ LDLIBS=$(PLLIB) `pkg-config --libs libgvc libsbml` -lgsl -lgslcblas -lm
SWIPL=$(PWD)/swipl-biocham
all: biocham biocham_debug test doc
all: biocham biocham_debug full_test doc
.PHONY: test doc clean
quick: unit_tests
.PHONY: all slow test unit_tests doc clean
biocham: platform/current swipl-biocham $(MODULES) toc.org Makefile
$(SWIPL) -o biocham \
$(SWIPL) -q -o biocham \
--goal=start --toplevel=toplevel -c $(MODULES)
biocham_debug: platform/current swipl-biocham $(MODULES) $(TEST_MODULES) \
......@@ -56,17 +58,25 @@ platform/current:
- rm platform/current
ln -s `uname` platform/current
test: biocham_tests
unit_tests: biocham_tests
./biocham_tests
doc: biocham
./biocham --generate-doc
biocham_tests: swipl-biocham $(MODULES) $(TEST_MODULES) Makefile
$(SWIPL) -o biocham_tests \
$(SWIPL) -q -o biocham_tests \
--goal="call_cleanup((run_tests, halt(0)), halt(1))" \
-c $(MODULES) $(TEST_MODULES)
full_test: biocham_full_tests
./biocham_full_tests
biocham_full_tests: swipl-biocham $(MODULES) $(TEST_MODULES) Makefile
$(SWIPL) -q -o biocham_full_tests \
--goal="call_cleanup((flag(slow_test, _, true), run_tests, halt(0)), halt(1))" \
-c $(MODULES) $(TEST_MODULES)
jupyter: biocham
jupyter kernelspec install --user --name=biocham biocham_kernel
......@@ -78,6 +88,7 @@ clean:
- rm biocham
- rm biocham_debug
- rm biocham_tests
- rm biocham_full_tests
- rm swipl-biocham
- rm swipl-biocham.o
......
......@@ -1042,7 +1042,7 @@ write_doc_item(biocham_silent(Command), _Type) :-
command(Command).
write_doc_item(biocham(Command), _Type) :-
print(Command),
% print(Command),
format_doc('\n', []),
with_output_to(
atom(Output),
......
:- use_module(library(plunit)).
:- begin_tests(foltl).
:- begin_tests(foltl, [condition(flag(slow_test, true, true))]).
test('validity_domain F', [true(Domain == (v >= 10))]) :-
clear_model,
......
......@@ -2,7 +2,7 @@
:- begin_tests(gsl).
test('van_der_pol') :-
test('van_der_pol', [condition(flag(slow_test, true, true))]) :-
Options = [
equations: [[1], -[0] + p(0) * [1] * (1 - [0] ^ 2)],
initial_values: [1.0, 0.0],
......
......@@ -3,7 +3,7 @@
:- begin_tests(numerical_simulation).
test('mapk') :-
test('mapk', [condition(flag(slow_test, true, true))]) :-
clear_model,
command(load(library:examples/mapk/mapk)),
numerical_simulation(100).
......
......@@ -34,22 +34,11 @@ test(
test(
'LVr.bc',
'Lotka-Voltera',
[
setup(load('library:examples/lotka_voltera/LVr.bc')),
cleanup(clear_model)
]
) :-
assertion(nusmv:check_ctl('EG'('R') /\ 'P', [], true)),
assertion(nusmv:check_ctl('EF'('AG'('R' /\ not('P'))), [], true)),
assertion(nusmv:check_ctl('EF'('AG'(not('R') /\ not('P'))), [], true)),
assertion(nusmv:check_ctl('EF'('AG'(not('R') /\ 'P')), [], false)).
test(
'LVi.bc',
[
setup(load('library:examples/lotka_voltera/LVi.bc')),
forall(member(File, ['library:examples/lotka_voltera/LVr.bc',
'library:examples/lotka_voltera/LVi.bc'])),
setup(load(File)),
cleanup(clear_model)
]
) :-
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment