mirror of
https://github.com/danog/ir.git
synced 2024-11-29 20:29:46 +01:00
[ir-test]: Fix #25: use 'fc.exe' for diff on Windows
Fix: https://github.com/dstogov/ir/issues/25 > nmake.exe -f .\win32\Makefile test-ci 001.irt is specially changed for test to fail. FAIL: 001: add function [.\tests\001.irt] Comparing files .\TESTS\001.exp and .\TESTS\001.OUT ***** .\TESTS\001.exp 1: { 2: uintptr_t c_1 = 1; 3: bool c_2 = 0; ***** .\TESTS\001.OUT 1: { 2: uintptr_t c_1 = 0; 3: bool c_2 = 0; ***** Signed-off-by: Tony Su <tao.su@intel.com>
This commit is contained in:
parent
1749168078
commit
66c07b8cc7
@ -24,13 +24,15 @@
|
||||
# define PATH_SEP "\\"
|
||||
# define EXE_SUF ".exe"
|
||||
# define REGEX_FLAGS std::regex::extended
|
||||
# define DIFF_ARGS "--strip-trailing-cr"
|
||||
# define DIFF_CMD "fc.exe"
|
||||
# define DIFF_ARGS "/n"
|
||||
# define IR_ARGS "--no-abort-fault"
|
||||
#else
|
||||
# define PATH_SEP "/"
|
||||
# define EXE_SUF ""
|
||||
# define REGEX_FLAGS std::regex::ECMAScript | std::regex::multiline
|
||||
# define DIFF_ARGS ""
|
||||
# define DIFF_CMD "diff"
|
||||
# define DIFF_ARGS "--strip-trailing-cr -u"
|
||||
# define IR_ARGS ""
|
||||
#endif
|
||||
|
||||
@ -182,7 +184,7 @@ namespace ir {
|
||||
in_os.close();
|
||||
|
||||
auto test_cmd = ::ir_exe + " " + ir_file + " " + args + " " + IR_ARGS + " >" + out_file + " 2>&1";
|
||||
auto diff_cmd = std::string("diff") + " " + DIFF_ARGS + " -u " + exp_file + " " + out_file + " > " + diff_file + " 2>&1";
|
||||
auto diff_cmd = std::string(DIFF_CMD) + " " + DIFF_ARGS + " " + exp_file + " " + out_file + " > " + diff_file + " 2>&1";
|
||||
|
||||
int ret_code = std::system(test_cmd.c_str()) >> 0x8;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user