Debian Codegraph @

crt/s2n/tests/integrationv2/Makefile

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").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15
16 # If the libcrypto that s2n was built with is not specified, assume latest(1.1.1).
17 # Required to determine the cipher suites to use in integration tests.
18 ifndef S2N_LIBCRYPTO
19 export S2N_LIBCRYPTO="openssl-1.1.1"
20 endif
21
22 HANDSHAKE_TEST_PARAMS:=--libcrypto $(S2N_LIBCRYPTO) $(S2ND_HOST) $(S2ND_PORT)
23
24 ifeq ($(S2N_CORKED_IO),true)
25 HANDSHAKE_TEST_PARAMS:=--use_corked_io $(HANDSHAKE_TEST_PARAMS)
26 endif
27
28 define run_tox
29 ( \
30 DYLD_LIBRARY_PATH="$(LIBCRYPTO_ROOT)/lib:$$DYLD_LIBRARY_PATH" \
31 LD_LIBRARY_PATH="$(LIBCRYPTO_ROOT)/lib:"$(S2N_ROOT)/test-deps/openssl-1.1.1/lib":"$(S2N_ROOT)/test-deps/gnutls37/nettle/lib":$$LD_LIBRARY_PATH" \
32 S2N_INTEG_TEST=1 \
33 PATH="$(S2N_ROOT)/bin":"$(S2N_ROOT)/test-deps/openssl-1.1.1/bin":"$(S2N_ROOT)/test-deps/gnutls37/bin":$(PATH) \
34 PYTHONNOUSERSITE=1 \
35 TOX_TEST_NAME=$(1).py \
36 python3.9 -m tox \
37 )
38 endef
39
40
41 TESTS=$(wildcard test_*.py)
42 TEST_NAMES=$(TESTS:.py=)
43
44 ifndef TOX_TEST_NAME
45 TOX_TEST_NAME := ${TEST_NAMES}
46 endif
47
48 .PHONY : all
49 all: $(TOX_TEST_NAME)
50
51 $(TOX_TEST_NAME):
52 $(call run_tox,$@)