Commit f3ee6ce6 authored by kinuthia's avatar kinuthia
Browse files

Merge branch 'main' into 730-directivity-pattern-id-not-set-correctly

parents 96248d57 17a3401a
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -42,19 +42,24 @@ def run_condition(eval_cmd, diff_cmd, id_count):
    cmd = subprocess.run(eval_cmd.split(), capture_output=True, text=True, check=True)

    # diff
    diff_success = 1
    diff_fails = ''
    if ';' in diff_cmd:
        # JBM cases
        diff_cmd1, diff_cmd2 = diff_cmd.split(';')
        cmd1 = subprocess.run(diff_cmd1.split(), capture_output=True, text=True, check=True)
        cmd2 = subprocess.run(diff_cmd2.split(), capture_output=True, text=True, check=True)
        diff_success = cmd1.returncode + cmd2.returncode
        cmd1 = subprocess.run(diff_cmd1.split(), stdout=subprocess.DEVNULL, check=False)
        cmd2 = subprocess.run(diff_cmd2.split(), stdout=subprocess.DEVNULL, check=False)
        if cmd1.returncode != 0:
            diff_fails += f'{diff_cmd1}\n'
        if cmd2.returncode != 0:
            diff_fails += f'{diff_cmd2}\n'
    else:
        cmd = subprocess.run(diff_cmd.split(), capture_output=True, text=True, check=True)
        diff_success = cmd.returncode
    if diff_success == 0:
        return None
        cmd = subprocess.run(diff_cmd.split(), stdout=subprocess.DEVNULL, check=False)
        if cmd.returncode != 0:
            diff_fails += f'{diff_cmd}\n'
    if diff_fails:
        return diff_fails
    else:
        return f'[{str(id_count).rjust(3)}] FAIL: {" ".join(eval_cmd)}\n            {diff_cmd}\n'
        return None


def environment_is_correct(paths):
@@ -116,6 +121,7 @@ if __name__ == '__main__':
                    if os.path.exists(tmp_dir):
                        shutil.rmtree(tmp_dir)
                    os.makedirs(tmp_dir)
                line = line.replace('testv', f'{test_vec_dir}/testv')
                line = line if tmp_dir is None else line.replace(
                    '$TMP/', f'{tmp_dir}/')
                if '$CUT_DEC_BIN' in line:
@@ -138,11 +144,11 @@ if __name__ == '__main__':

    results = [r.get() for r in results if r.get()]
    if results:
        print(f'\n{len(results)} test conditions failed:')
        print('\n'.join(results))
        print(f'\n --- {len(results)} test conditions failed ---')
        print(''.join(results))
        with open('failed.txt', 'w') as f:
            print(f'\n{len(results)} test conditions failed:', file=f)
            print('\n'.join(results), file=f)
            print(f' --- {len(results)} test conditions failed ---', file=f)
            print(''.join(results), file=f)
        sys.exit(1)
    else:
        print('\n *** All tests passed! ***')
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ cp -R ../Makefile $targetdir
cp -R ../CMakeLists.txt $targetdir
cp -R ../Workspace_msvc $targetdir
if [ $INCLUDE_SPLIT -eq 0 ]; then
    strip_split_rendering.sh $targetdir
    ./strip_split_rendering.sh $targetdir
fi

# back up #ifdef-list
+0 −0

File mode changed from 100644 to 100755.