Fix: update the correct pre-built script to cmake-sonar.sh
[ric-app/mc.git] / CMakeLists.txt
1 #
2 #==================================================================================
3 #       Copyright (c) 2018-2020 AT&T Intellectual Property.
4 #
5 #   Licensed under the Apache License, Version 2.0 (the "License");
6 #   you may not use this file except in compliance with the License.
7 #   You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #   Unless required by applicable law or agreed to in writing, software
12 #   distributed under the License is distributed on an "AS IS" BASIS,
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #   See the License for the specific language governing permissions and
15 #   limitations under the License.
16 #==================================================================================
17 #
18
19 # This top level CMake definition is intended only to suppor the LF jenkins
20 # environment which seems not to be customisable. It does NOT build anything.
21 # Run tests like this:
22 #
23 #       mkdir .build
24 #       cd .build
25 #       cmake ..
26 #       make tests ARGS=-v
27
28 #       See ci/build_all for an example of how to build and test
29
30 project( mc_testing LANGUAGES C )
31 cmake_minimum_required( VERSION 3.5 )
32
33 # ------------- testing -------------------------------------------------------
34 enable_testing()
35
36 # cmake cannot set env vars, so we have to passed desired vars on the wrapper command
37 # and assume the wrapper will do the right thing with them.  CMake also seems unable
38 # to reference ../dir1/dir2 (../dir1 works), so we have to use the crazy syntax
39 # with the absurdly long variable name before the ../.
40 #
41 add_test(
42                 NAME drive_listener_tests
43                 COMMAND  bash run_unit_test.ksh CMBUILD=${CMAKE_CURRENT_BINARY_DIR}
44                 WORKING_DIRECTORY   ${CMAKE_CURRENT_BINARY_DIR}/../sidecars/listener/test
45 )
46
47 # the listener application tests for sonar reports
48 add_test(
49                 NAME drive_mcl_app_tests
50                 COMMAND  bash run_app_tests.ksh CMBUILD=${CMAKE_CURRENT_BINARY_DIR}
51                 WORKING_DIRECTORY   ${CMAKE_CURRENT_BINARY_DIR}/../sidecars/listener/test
52 )