1#!/bin/bash
2
3cd `dirname $0`
4echo '-------build function test----------'
5
6MAKE=make
7if command -v python > /dev/null ; then
8  MAKE="make -j $(python -c 'import multiprocessing as mp; print(int(mp.cpu_count()))')"
9fi
10
11echo $MAKE
12
13FT_BUILD_DIR=ft_build
14rm -rf $FT_BUILD_DIR
15mkdir $FT_BUILD_DIR
16cd $FT_BUILD_DIR
17cmake -DBUILD_FUNCTION_TESTS=ON -DBUILD_UNIT_TESTS=OFF ..
18$MAKE cdn core cs ecs rds slb vpc cdn_ft core_ft cs_ft ecs_ft nlp_ft rds_ft slb_ft vpc_ft
19
20echo '------- run function test -----------'
21
22ctest --verbose
23