From 1fa6e257567deca30cb2c0145905549aff39d361 Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Wed, 24 Nov 2021 15:14:31 +0100 Subject: [PATCH] ssa test ci cd --- .../run_ssa_smoketest.py | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/bin/ssa-end-to-end-testing/run_ssa_smoketest.py b/bin/ssa-end-to-end-testing/run_ssa_smoketest.py index 219ffcead4..14cc9f2e97 100644 --- a/bin/ssa-end-to-end-testing/run_ssa_smoketest.py +++ b/bin/ssa-end-to-end-testing/run_ssa_smoketest.py @@ -71,27 +71,27 @@ def main(args): # if not test_result_passed: # sys.exit(1) - # # test SSA detections - # test_results = [] - # test_passed = True - # for test_file in test_files_ssa: - # test_obj, attack_data_folder = prepare_test(test_file) - # test_result = ssa_detection_testing.test_ssa_detections(test_obj) - # test_results.append(test_result.copy()) - # remove_attack_data(attack_data_folder) + # test SSA detections + test_results = [] + test_passed = True + for test_file in test_files_ssa: + test_obj, attack_data_folder = prepare_test(test_file) + test_result = ssa_detection_testing.test_ssa_detections(test_obj) + test_results.append(test_result.copy()) + remove_attack_data(attack_data_folder) - # LOGGER.info('-----------------------------------') - # LOGGER.info('------- test SSA detections -------') - # LOGGER.info('-----------------------------------') - # for test_result in test_results: - # test_passed = test_passed and test_result['result'] - # LOGGER.info(test_result['msg']) - # LOGGER.info('-----------------------------------') + LOGGER.info('-----------------------------------') + LOGGER.info('------- test SSA detections -------') + LOGGER.info('-----------------------------------') + for test_result in test_results: + test_passed = test_passed and test_result['result'] + LOGGER.info(test_result['msg']) + LOGGER.info('-----------------------------------') - # if github_service.created_repo: - # remove_security_content() - # exit_code = not test_passed - # sys.exit(exit_code) + if github_service.created_repo: + remove_security_content() + exit_code = not test_passed + sys.exit(exit_code)