diff options
-rw-r--r-- | recipe/build.sh | 14 | ||||
-rw-r--r-- | recipe/meta.yaml | 10 | ||||
-rw-r--r-- | test/test_CPU_regularisers.py | 2 | ||||
-rwxr-xr-x | test/test_run_test.py (renamed from recipe/run_test.py) | 24 |
4 files changed, 20 insertions, 30 deletions
diff --git a/recipe/build.sh b/recipe/build.sh index a156193..ad78cca 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,18 +1,8 @@ - -#mkdir "$SRC_DIR/ccpi" -#cp -rv "$RECIPE_DIR/../src/Matlab" "$SRC_DIR/ccpi" -#cp -rv "$RECIPE_DIR/../src/Python" "$SRC_DIR/ccpi" -#cp -rv "$RECIPE_DIR/../src/Core" "$SRC_DIR/Core" +set -xe +cp -rv "$RECIPE_DIR/../test/" "$SRC_DIR/" cd $SRC_DIR -##cuda=off cmake -G "Unix Makefiles" $RECIPE_DIR/../ -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=$CONDA_PREFIX/lib -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX - make install - -#$PYTHON setup-regularisers.py build_ext -#$PYTHON setup-regularisers.py install - - diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6f36906..6ff4e31 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,14 +9,14 @@ build: - CIL_VERSION test: - files: - - ../test/lena_gray_512.tif + source_files: + - ./test/ requires: - pillow - pillow=4.1.1 # [win] -# command: -# - unittest -d discover .... ../test - + commands: + - python -c "import os; print (os.getcwd())" + - python -m unittest discover -s test requirements: build: - python diff --git a/test/test_CPU_regularisers.py b/test/test_CPU_regularisers.py index 379b989..851569c 100644 --- a/test/test_CPU_regularisers.py +++ b/test/test_CPU_regularisers.py @@ -11,7 +11,7 @@ from testroutines import * class TestRegularisers(unittest.TestCase): def getPars(self): - filename = os.path.join("lena_gray_512.tif") + filename = os.path.join("test","lena_gray_512.tif") plt = TiffReader() # read image Im = plt.imread(filename) diff --git a/recipe/run_test.py b/test/test_run_test.py index f551616..5a688c9 100755 --- a/recipe/run_test.py +++ b/test/test_run_test.py @@ -39,7 +39,7 @@ class TestRegularisers(unittest.TestCase): def test_ROF_TV_CPU_vs_GPU(self):
#print ("tomas debug test function")
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -107,7 +107,7 @@ class TestRegularisers(unittest.TestCase): def test_FGP_TV_CPU_vs_GPU(self):
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -192,7 +192,7 @@ class TestRegularisers(unittest.TestCase): def test_SB_TV_CPU_vs_GPU(self):
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -273,7 +273,7 @@ class TestRegularisers(unittest.TestCase): def test_TGV_CPU_vs_GPU(self):
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -352,7 +352,7 @@ class TestRegularisers(unittest.TestCase): def test_LLT_ROF_CPU_vs_GPU(self):
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -427,7 +427,7 @@ class TestRegularisers(unittest.TestCase): def test_NDF_CPU_vs_GPU(self):
print(__name__)
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -505,7 +505,7 @@ class TestRegularisers(unittest.TestCase): def test_Diff4th_CPU_vs_GPU(self):
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -577,7 +577,7 @@ class TestRegularisers(unittest.TestCase): self.assertLessEqual(diff_im.sum() , 1)
def test_FDGdTV_CPU_vs_GPU(self):
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
Im = plt.imread(filename)
@@ -664,7 +664,7 @@ class TestRegularisers(unittest.TestCase): def test_cpu_ROF_TV(self):
#filename = os.path.join(".." , ".." , ".." , "data" ,"testLena.npy")
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
@@ -701,7 +701,7 @@ class TestRegularisers(unittest.TestCase): def test_cpu_FGP_TV(self):
#filename = os.path.join(".." , ".." , ".." , "data" ,"testLena.npy")
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
@@ -741,7 +741,7 @@ class TestRegularisers(unittest.TestCase): def test_gpu_ROF(self):
#filename = os.path.join(".." , ".." , ".." , "data" ,"testLena.npy")
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
@@ -776,7 +776,7 @@ class TestRegularisers(unittest.TestCase): def test_gpu_FGP(self):
#filename = os.path.join(".." , ".." , ".." , "data" ,"testLena.npy")
- filename = os.path.join("lena_gray_512.tif")
+ filename = os.path.join("test","lena_gray_512.tif")
plt = TiffReader()
# read image
|