Debian Codegraph @

crt/s2n/codebuild/spec/buildspec_mem.yml

raw symbols SCIP
1 ---
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. A copy of the License is
6 # located at
7 #
8 # http://aws.amazon.com/apache2.0/
9 #
10 # or in the "license" file accompanying this file. This file is distributed on an
11 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied. See the License for the specific language governing permissions and
13 # limitations under the License.
14 version: 0.2
15
16 env:
17 shell: bash
18 variables:
19 CTEST_OUTPUT_ON_FAILURE: 1
20 S2N_TEST_NAME: s2n_mem_usage_test
21
22 phases:
23 pre_build:
24 commands:
25 - |
26 if [ -d "third-party-src" ]; then
27 cd third-party-src;
28 fi
29 build:
30 on-failure: ABORT
31 commands:
32 - export CTEST_PARALLEL_LEVEL=$(nproc)
33 # Test for expected memory
34 - |
35 cmake . -Bbuild \
36 -DCMAKE_PREFIX_PATH=/usr/local/$S2N_LIBCRYPTO
37 - cmake --build build -j $(nproc) --target $S2N_TEST_NAME
38 - echo ">>>> POSITIVE TEST - EXPECTED TO SUCCEED <<<<"
39 - make -C build test -- ARGS="-R $S2N_TEST_NAME"
40 # Test for unexpected memory to confirm failure possible
41 # Use an unrealistically high number
42 - cmake --build build -j $(nproc) --target $S2N_TEST_NAME
43 - echo ">>>> NEGATIVE TESTS - EXPECTED TO FAIL <<<<"
44 - |
45 ! S2N_EXPECTED_CONNECTION_MEMORY_KB=3 make -C build test -- ARGS="-R $S2N_TEST_NAME"
46 ! S2N_EXPECTED_CONNECTION_MEMORY_KB=500 make -C build test -- ARGS="-R $S2N_TEST_NAME"