From fbbd00be2a05fdb0a88548e0d5a0795a1f14e2c6 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 Nov 2023 18:44:53 +0000
Subject: [PATCH] Change to cloning sbml test suite from github & run tests
---
.github/workflows/ci.yml | 10 ++++++++++
.gitignore | 1 +
runSBMLTestSuite.sh | 7 +++----
.../java/org/neuroml/importer/sbml/SBMLImporter.java | 4 ++--
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c2b4af..3795a73 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -117,3 +117,13 @@ jobs:
pwd
mvn install
mvn dependency:tree
+
+
+ - name: Run SBML test suite
+ run: |
+ git clone https://github.com/sbmlteam/sbml-test-suite.git
+
+ mvn assembly:assembly -DdescriptorId=jar-with-dependencies"
+
+ java -Xmx400M -classpath target/*jar-with-dependencies.jar org.neuroml.importer.sbml.SBMLImporter -runSBMLTestSuite
+
diff --git a/.gitignore b/.gitignore
index 02e8b1a..0d28bfc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ src/test/resources/tmp
biomodels
Errors.txt
+/sbml-test-suite/
diff --git a/runSBMLTestSuite.sh b/runSBMLTestSuite.sh
index 50bcc1f..6ce41ee 100755
--- a/runSBMLTestSuite.sh
+++ b/runSBMLTestSuite.sh
@@ -1,13 +1,12 @@
#!/bin/bash
-if [ ! -d "sbmlTestSuite" ]; then
+if [ ! -d "sbml-test-suite" ]; then
echo ""
- echo "A copy of the SBML Test Suite needs to be checked out from Sourceforge. Try:"
+ echo "A copy of the SBML Test Suite needs to be checked out from GitHub. Try:"
echo ""
- echo " mkdir sbmlTestSuite"
- echo " svn checkout https://svn.code.sf.net/p/sbml/code/trunk/test-suite/cases sbmlTestSuite/cases"
+ echo " git clone https://github.com/sbmlteam/sbml-test-suite.git"
echo ""
exit 1
diff --git a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
index 60c21c1..3c84cc4 100644
--- a/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
+++ b/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java
@@ -1209,7 +1209,7 @@ public static void main(String[] args) throws Exception
- File sbmlTestSuiteDir = new File("sbmlTestSuite/cases/semantic/");
+ File sbmlTestSuiteDir = new File("sbml-test-suite/cases/semantic/");
boolean useSbmlTestSuite = sbmlTestSuiteDir.exists() && forceSBMLTestSuite;
@@ -1292,7 +1292,7 @@ public static void main(String[] args) throws Exception
while(testCase.length()<5) testCase ="0"+testCase;
- sbmlFile = new File("sbmlTestSuite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
+ sbmlFile = new File("sbml-test-suite/cases/semantic/"+testCase+"/"+testCase+"-sbml-"+version+".xml");
if (!sbmlFile.exists()){
E.info(" ---- File not found: "+sbmlFile.getAbsolutePath()+"!! ---- \n\n");
notFound++;