H-e8dZddlZddlmcmZddlZddlZddl Z ddl Z ddl Z ddl Z e j dde jDde jDe jdZe j dde jDd e jDe je jd Zed krddlZe jejdSdS) z| Checks that the functional test program (functest) can be successfully built and executed for every scheme/implementation. Nz.implementation,test_dir,impl_path, init, destrcdg|]-}|gtj|dR.S)test_functest_helpersisolate_test_filespath.0impls 6/Users/thom/git/pqcrypto/pqclean/test/test_functest.py r sOAAA  GW ' 5E F FGGAAAc,g|]}t|Sstrr s r r r NNNtTNNNr)idsc |tj|d}tjd|jj|jj|j||tj|dtjtj|d |jj|jtjdkrdndg|dS) Nbinfunctesttest)TYPESCHEMEIMPLEMENTATION SCHEME_DIRDEST_DIR working_dirfunctest_{}_{}{}nt.exe) osrjoinrmakeschemetypenamerun_subprocessformat)implementation impl_pathtest_dirinitdestrdest_dirs r test_functestr1s DFFFw||He,,H L$+0&-2 . 3%"W\\(F;; ====  h 2 9 9  ! &  gooFF2! !     EGGGGGrcdg|]-}|gtj|dR.S)test_functest_sanitizers_rr s r r r .sYAAA  M!$))++/JKKMMAAArc,g|]}t|Srrr s r r r 1rrctj|d}d}tjdkr6dtjddvrtjdtjdkr6dtjddvrtjdtjdkrDdtjddvr"d |j j vrtjd tjd vrd d i}n^tj dkrtjdtd tj|tjdd|j j|j j |j d||tj|d| tjtj|d |j j |j tj dkrdndg||dS)NrppcclangCCgccz"Clang does not support ASAN on ppcarmv7lz#A bug with asan on armv7l, see #471sphincsz3asan for sphincs on armv7l with gcc hangs, see #470)r:aarch64 ASAN_OPTIONSzdetect_leaks=0DarwinzASAN is not reliable on OSXzSupported platform: {}z clean-schemerzj-g -fsanitize=address,undefined -fno-sanitize-recover=undefined -Wno-unused-command-line-argument -latomicr)rrr EXTRAFLAGSrrrenvrr r!r")r@)r#rr$platformmachineenvirongetunittestSkipTestr&r(systemprintr*rr%r'r))r+r,r-r.r/r0r@s r test_functest_sanitizersrI,s@w||He,,H CU""w"*..u2M2M'M'M DEEE    x ' 'Grz~~dE7R7R,R,R EFFF    x ' 'ERZ^^D%5P5P,P,PU^bpbwb|U|U| UVVV    4 4 4/0   h & & =>>> &--h.>.@.@AABBBDFFF L$+0&-2 . 3B &"W\\(F;;      h 2 9 9  ! &  gooFF2! !      EGGGGGr__main__)__doc__builtins @py_builtins_pytest.assertion.rewrite assertionrewrite @pytest_arr#rArEpytestrpqcleanmark parametrizeSchemeall_supported_implementations filtered_testr1 skip_windowsrI__name__sysmainargvrrr r^s   4AA==??AAANNw~KKMMNNN       *4AA==??AAA ONw~KKMMNNN ) ) ) X zJJJFKr