From aad06abff10c7286409e53d5e93669661a13e344 Mon Sep 17 00:00:00 2001
From: Roland Jansky <roland.jansky@cern.ch>
Date: Fri, 3 May 2019 11:19:42 +0000
Subject: [PATCH] Adding CI

---
 .gitlab-ci.yml                                | 30 +++++++++++++++++--
 CMakeLists.txt                                |  2 +-
 Dockerfile                                    | 11 -------
 .../share/ut_xAODFaserObjectType_test.ref     |  4 +--
 .../xAODFaserTracking_StripRawData_test.ref   |  4 ---
 5 files changed, 31 insertions(+), 20 deletions(-)
 delete mode 100644 Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26e19d47..c552fd27 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,9 +2,11 @@ variables:
   # all submodules will be cloned recursively upon start of CI job
   GIT_SUBMODULE_STRATEGY: recursive
   GIT_SSL_NO_VERIFY: "true"
+  ATLAS_LOCAL_ROOT_BASE: /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
 
 stages:
   - build
+  - test
 
 ##########################
 # BUILD stage            #                                
@@ -16,6 +18,30 @@ build_image:
   #              in the following stages of the pipeline for testing the code
   stage: build
   tags:
-    - docker-image-build
+    - cvmfs
+    - docker
   script:
-    - ignore
+    - yum -y install redhat-lsb redhat-lsb-core man uuid-devel libuuid libuuid-devel
+    - mkdir build
+    - cd build
+    - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e
+    - set +e && asetup master,latest,Athena; set -e
+    - cmake ../../calypso
+    - make
+  artifacts:
+    paths:
+    - build/
+
+test_unittest:
+  stage: test
+  tags:
+    - cvmfs
+    - docker
+  script: 
+    - yum -y install man
+    - cd build
+    - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e
+    - set +e && asetup master,latest,Athena; set -e
+    - ctest -j12
+  dependencies:
+    - build_image
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 196fb3b8..a30d84f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@ find_package( Athena )
 
 atlas_ctest_setup()
 
-atlas_project( Faser 1.0.0
+atlas_project( Calypso 1.0.0
   USE ${ATLAS_PROJECT} ${${ATLAS_PROJECT}_VERSION} )
 
 lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh )
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index cca60d25..00000000
--- a/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-# The release set in this Dockerfile defines the release of the whole project
-# and is parsed by every setup script and by the installation instructions.
-# Be aware of this effect if you edit the release here!
-FROM atlas/atlas_external_cvmfs
-ADD . /calypso
-WORKDIR /build
-RUN setupATLAS && \
-    asetup master,latest,Athena && \
-    cmake -DCMAKE_INSTALL_PREFIX=../run ../calypso && \
-    make
-
diff --git a/xAOD/xAODFaserBase/share/ut_xAODFaserObjectType_test.ref b/xAOD/xAODFaserBase/share/ut_xAODFaserObjectType_test.ref
index 4b971698..be845efb 100644
--- a/xAOD/xAODFaserBase/share/ut_xAODFaserObjectType_test.ref
+++ b/xAOD/xAODFaserBase/share/ut_xAODFaserObjectType_test.ref
@@ -1,2 +1,2 @@
-xAOD::Type::Track, xAOD::Type::CaloCluster
-UNKNOWN
+xAOD::FaserType::Track, xAOD::FaserType::CaloCluster
+UNKNOWN
\ No newline at end of file
diff --git a/xAOD/xAODFaserTracking/share/xAODFaserTracking_StripRawData_test.ref b/xAOD/xAODFaserTracking/share/xAODFaserTracking_StripRawData_test.ref
index cb3d5a59..1a59d6a5 100644
--- a/xAOD/xAODFaserTracking/share/xAODFaserTracking_StripRawData_test.ref
+++ b/xAOD/xAODFaserTracking/share/xAODFaserTracking_StripRawData_test.ref
@@ -2,7 +2,3 @@ id = 1111111111111
 word = 1010111
  Dumping StripRawDataAuxContainer
 id:1.11111e+12, dataword:1.01011e+06,
-id = 1111111111111
-word = 1010111
- Dumping StripRawDataAuxContainer
-id:1.11111e+12, dataword:1.01011e+06,
-- 
GitLab