diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b1c5506327502bf07df17cf5e56a14d861cee06f..76e2fc5d1b2da0c5c34409679e5baaa3c5f144a2 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -10,6 +10,8 @@
 ###
 include(RulesPrecisions)
 
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
 ## Generate the test library files for all required precisions
 set(LIB_SOURCES
   z_spm_tests.c
diff --git a/tests/core_zgeadd.c b/tests/core_zgeadd.c
index bde4d626f5cb6d03c16c56fc86d6023e612243ee..758224ebe168d882e8f1d62a3734b3f52d1129f0 100644
--- a/tests/core_zgeadd.c
+++ b/tests/core_zgeadd.c
@@ -15,7 +15,7 @@
  * @precisions normal z -> c d s
  *
  **/
-#include <spm.h>
+#include <spm_tests.h>
 #include "cblas.h"
 
 /**
diff --git a/tests/core_zplrnt.c b/tests/core_zplrnt.c
index b22e2dfe2a3d88b1d4bfe55c45c3e06aa8453800..e210cab72ccc4926d26310e0ebfb718ab4aedcd5 100644
--- a/tests/core_zplrnt.c
+++ b/tests/core_zplrnt.c
@@ -17,7 +17,7 @@
  * @precisions normal z -> c d s
  *
  **/
-#include <spm.h>
+#include <spm_tests.h>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 #define Rnd64_A  6364136223846793005ULL
diff --git a/tests/get_options.c b/tests/get_options.c
index 40c2d2817c1a7447a75e79d67d50ad39afdc48bd..6116e34f6b2c2201de408f20e11fc4c3df9eaf0c 100644
--- a/tests/get_options.c
+++ b/tests/get_options.c
@@ -13,7 +13,7 @@
  * @date 2017-06-15
  *
  */
-#include <spm.h>
+#include <spm_tests.h>
 #include <unistd.h>
 #if defined(HAVE_GETOPT_H)
 #include <getopt.h>
diff --git a/tests/p_spm_tests.c b/tests/p_spm_tests.c
index a3add89dcff95d9d07d0d7a975ed3d90104b88cc..030432639d1215f000337bcd1c57ee346794afdc 100644
--- a/tests/p_spm_tests.c
+++ b/tests/p_spm_tests.c
@@ -22,7 +22,7 @@
 #include <math.h>
 #include <string.h>
 #include <assert.h>
-#include <spm.h>
+#include <spm_tests.h>
 #include "cblas.h"
 #include "lapacke.h"
 #include <p_spm.h>
diff --git a/tests/spm_convert_tests.c b/tests/spm_convert_tests.c
index 885d23d09ac16e081615fe30923f2e3ddc8efc70..bfff58cb31020e25431a2d2a8de4e488ebeaa253 100644
--- a/tests/spm_convert_tests.c
+++ b/tests/spm_convert_tests.c
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include <spm.h>
+#include <spm_tests.h>
 
 #define PRINT_RES(_ret_)                        \
     if(_ret_ == -1) {                           \
diff --git a/tests/spm_dof_expand_tests.c b/tests/spm_dof_expand_tests.c
index 48302804b3b7f6f40f1f3ce9ed2a95e2e7fe7f34..40cafbf60cfbadfbe3499707dba7cffca0eba1d9 100644
--- a/tests/spm_dof_expand_tests.c
+++ b/tests/spm_dof_expand_tests.c
@@ -2,7 +2,7 @@
  *
  * @file spm_dof_expand_tests.c
  *
- * Tests and validate the spmNorm routines when the spm hold constant and/or variadic dofs.
+ * Tests and validate the spmNorm routines when the spm_tests.hold constant and/or variadic dofs.
  *
  * @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
  *                      Univ. Bordeaux. All rights reserved.
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include "spm.h"
+#include "spm_tests.h"
 
 int z_spm_norm_check( const spmatrix_t *spm );
 int c_spm_norm_check( const spmatrix_t *spm );
diff --git a/tests/spm_dof_matvec_tests.c b/tests/spm_dof_matvec_tests.c
index c73b82418025418f0af486566f97a3ca4ecd2af4..275cd055f832db842d0d1a8459bccc3fa0f04aa1 100644
--- a/tests/spm_dof_matvec_tests.c
+++ b/tests/spm_dof_matvec_tests.c
@@ -2,7 +2,7 @@
  *
  * @file spm_dof_matvec_tests.c
  *
- * Tests and validate the spmMatVec routines when the spm hold constant and/or variadic dofs.
+ * Tests and validate the spmMatVec routines when the spm_tests.hold constant and/or variadic dofs.
  *
  * @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
  *                      Univ. Bordeaux. All rights reserved.
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include "spm.h"
+#include "spm_tests.h"
 
 int z_spm_matvec_check( int trans, const spmatrix_t *spm );
 int c_spm_matvec_check( int trans, const spmatrix_t *spm );
diff --git a/tests/spm_dof_norm_tests.c b/tests/spm_dof_norm_tests.c
index cb6879fab1d3506dabc55b8d6c1d51fc9903e484..1e75148d1960b29e067a6fc8eb62e59c422d1c06 100644
--- a/tests/spm_dof_norm_tests.c
+++ b/tests/spm_dof_norm_tests.c
@@ -2,7 +2,7 @@
  *
  * @file spm_dof_norm_tests.c
  *
- * Tests and validate the spm_norm routines when the spm hold constant and/or variadic dofs.
+ * Tests and validate the spm_norm routines when the spm_tests.hold constant and/or variadic dofs.
  *
  * @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
  *                      Univ. Bordeaux. All rights reserved.
@@ -20,7 +20,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include <spm.h>
+#include <spm_tests.h>
 
 int z_spm_norm_check( const spmatrix_t *spm );
 int c_spm_norm_check( const spmatrix_t *spm );
diff --git a/tests/spm_matvec_tests.c b/tests/spm_matvec_tests.c
index b608b09e730775d7a639c27938e8df8fe7b3872b..1dc61ad39eb1f087af6e4f385b117a427cfe5d4f 100644
--- a/tests/spm_matvec_tests.c
+++ b/tests/spm_matvec_tests.c
@@ -20,7 +20,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include "spm.h"
+#include "spm_tests.h"
 
 int z_spm_matvec_check( int trans, const spmatrix_t *spm );
 int c_spm_matvec_check( int trans, const spmatrix_t *spm );
diff --git a/tests/spm_norm_tests.c b/tests/spm_norm_tests.c
index 4b1d7bd1465912820ebd7c8e696c5aa2d06188fb..354962569675ecfe2c8fcdca1913116547e19730 100644
--- a/tests/spm_norm_tests.c
+++ b/tests/spm_norm_tests.c
@@ -20,7 +20,7 @@
 #include <string.h>
 #include <assert.h>
 #include <time.h>
-#include <spm.h>
+#include <spm_tests.h>
 
 int z_spm_norm_check( const spmatrix_t *spm );
 int c_spm_norm_check( const spmatrix_t *spm );
diff --git a/tests/spm_tests.h b/tests/spm_tests.h
new file mode 100644
index 0000000000000000000000000000000000000000..2be8bee1c1b756c69126dba8915ef99446beb6aa
--- /dev/null
+++ b/tests/spm_tests.h
@@ -0,0 +1,90 @@
+/**
+ *
+ * @file spm_tests.h
+ *
+ * SParse Matrix package testings header.
+ *
+ * @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
+ *
+ * @version 1.0.0
+ * @author Mathieu Faverge
+ * @date 2013-06-24
+ *
+ **/
+#ifndef _spm_tests_h_
+#define _spm_tests_h_
+
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+#include <spm.h>
+
+void spmGetOptions( int argc, char **argv,
+		    spm_driver_t *driver, char **filename );
+
+void core_zplrnt( int m, int n, spm_complex64_t *A, int lda,
+		  int gM, int m0, int n0, unsigned long long int seed );
+int  core_zgeadd( spm_trans_t            trans,
+		  spm_int_t              M,
+		  spm_int_t              N,
+		  spm_complex64_t        alpha,
+		  const spm_complex64_t *A,
+		  spm_int_t              LDA,
+		  spm_complex64_t        beta,
+		  spm_complex64_t       *B,
+		  spm_int_t              LDB );
+
+void core_cplrnt( int m, int n, spm_complex32_t *A, int lda,
+		  int gM, int m0, int n0, unsigned long long int seed );
+int  core_cgeadd( spm_trans_t            trans,
+		  spm_int_t              M,
+		  spm_int_t              N,
+		  spm_complex32_t        alpha,
+		  const spm_complex32_t *A,
+		  spm_int_t              LDA,
+		  spm_complex32_t        beta,
+		  spm_complex32_t       *B,
+		  spm_int_t              LDB );
+
+void core_dplrnt( int m, int n, double *A, int lda,
+		  int gM, int m0, int n0, unsigned long long int seed );
+int  core_dgeadd( spm_trans_t   trans,
+		  spm_int_t     M,
+		  spm_int_t     N,
+		  double        alpha,
+		  const double *A,
+		  spm_int_t     LDA,
+		  double        beta,
+		  double       *B,
+		  spm_int_t     LDB );
+
+void core_splrnt( int m, int n, float *A, int lda,
+		  int gM, int m0, int n0, unsigned long long int seed );
+int  core_sgeadd( spm_trans_t  trans,
+		  spm_int_t    M,
+		  spm_int_t    N,
+		  float        alpha,
+		  const float *A,
+		  spm_int_t    LDA,
+		  float        beta,
+		  float       *B,
+		  spm_int_t    LDB );
+
+void z_spm_print_check( char *filename, const spmatrix_t *spm );
+int  z_spm_matvec_check( int trans, const spmatrix_t *spm );
+int  z_spm_norm_check( const spmatrix_t *spm );
+
+void c_spm_print_check( char *filename, const spmatrix_t *spm );
+int  c_spm_matvec_check( int trans, const spmatrix_t *spm );
+int  c_spm_norm_check( const spmatrix_t *spm );
+
+void d_spm_print_check( char *filename, const spmatrix_t *spm );
+int  d_spm_matvec_check( int trans, const spmatrix_t *spm );
+int  d_spm_norm_check( const spmatrix_t *spm );
+
+void s_spm_print_check( char *filename, const spmatrix_t *spm );
+int  s_spm_matvec_check( int trans, const spmatrix_t *spm );
+int  s_spm_norm_check( const spmatrix_t *spm );
+
+#endif /* _spm_tests_h_ */
diff --git a/tests/z_spm_tests.c b/tests/z_spm_tests.c
index 54615c564093164973410737b767d259e0e15c10..6d74e8f894bb6ce1e8c0f79426d679e3ab988066 100644
--- a/tests/z_spm_tests.c
+++ b/tests/z_spm_tests.c
@@ -24,7 +24,7 @@
 #include <math.h>
 #include <string.h>
 #include <assert.h>
-#include <spm.h>
+#include <spm_tests.h>
 #include "cblas.h"
 #include "lapacke.h"
 #include <z_spm.h>