Debian Codegraph @

src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/build/linux/build_linux.sh

raw
1 #!/bin/bash
2 # Copyright (c) Microsoft. All rights reserved.
3 # Licensed under the MIT license. See LICENSE file in the project root for full license information.
4
5 set -e
6
7 build_root=$(cd "$1" && pwd)
8 cd $build_root
9
10 build_folder=$build_root"/cmake_linux"
11
12 # Set the default cores
13 CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
14
15 rm -r -f $build_folder
16 mkdir -p $build_folder
17 pushd $build_folder
18 cmake -Drun_valgrind:BOOL=ON $build_root -Drun_unittests:BOOL=ON -Drun_int_tests:BOOL=ON
19 make --jobs=$CORES
20
21 ctest -j $CORES --output-on-failure
22
23 popd