From 8bef65e543a38777bd1d71efb18bf235438def2d Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Fri, 15 Mar 2019 15:04:24 -0400 Subject: [PATCH] added test command to makefile --- .gitignore | 3 +++ .gitlab-ci.yml | 9 +++++++++ code/makefile | 3 +++ {sample => code/sample}/4pi-IC1/itape | 0 {sample => code/sample}/4pi-IC1/sfield.diff | 0 code/test.sh | 4 ++++ 6 files changed, 19 insertions(+) create mode 100644 .gitignore rename {sample => code/sample}/4pi-IC1/itape (100%) rename {sample => code/sample}/4pi-IC1/sfield.diff (100%) create mode 100644 code/test.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18b8e1c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +code/*.mod +code/*.o +code/ex diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1cf722..a7ffe17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,3 +8,12 @@ make: - cd ${CI_PROJECT_DIR} - cd code - make clean && make + +test: + stage: test + tags: + - docker + script: + - cd ${CI_PROJECT_DIR} + - cd code + - make test diff --git a/code/makefile b/code/makefile index 2692fd1..b54a0bd 100644 --- a/code/makefile +++ b/code/makefile @@ -14,5 +14,8 @@ ysolve.mod: ysolve.f90 compact.mod compact.mod: Compact.f90 ${compiler} -c ${flags} Compact.f90 +test: ex + sh test.sh + clean: rm -f *.o *.mod ex diff --git a/sample/4pi-IC1/itape b/code/sample/4pi-IC1/itape similarity index 100% rename from sample/4pi-IC1/itape rename to code/sample/4pi-IC1/itape diff --git a/sample/4pi-IC1/sfield.diff b/code/sample/4pi-IC1/sfield.diff similarity index 100% rename from sample/4pi-IC1/sfield.diff rename to code/sample/4pi-IC1/sfield.diff diff --git a/code/test.sh b/code/test.sh new file mode 100644 index 0000000..0744735 --- /dev/null +++ b/code/test.sh @@ -0,0 +1,4 @@ +cd sample/4pi-IC1 +ls +../../ex +diff sfield.dat sfield.diff