1 Star 0 Fork 14

Bogomolov Mikhail/llvm-test-suite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
DiffOutput.sh 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
#
# NAME
# DiffOutput.sh
#
# SYNOPSIS
# DiffOutput.sh <diff&opts> <testtype> <testname> [<goodoutput>]
#
# DESCRIPTION
# DiffOutput.sh looks for a file named Output/<testname>.out-<testtype>
# and uses GNU diff to compare it against the file
# Output/<testname>.out-<goodoutput>. This script is used to verify the
# results of programs run in the LLVM test suite. By default,
# <goodoutput> is "nat"; that is, test results are compared with output
# from the program compiled with the native compiler.
# If the files differ, DiffOutput.sh prints a portion of the
# differences.
#
# EXIT STATUS
# DiffOutput.sh always exits with a zero (successful) exit code.
#
# Command line parameters:
DIFF=$1
WHICHOUTPUT=$2
PROG=$3
GOODOUTPUT=${4-nat}
# Output filename:
DIFFOUTPUT=Output/${PROG}.diff-${WHICHOUTPUT}
# Input filenames:
TESTOUTPUT=Output/${PROG}.out-${WHICHOUTPUT}
GOODOUTPUT=Output/${PROG}.out-${GOODOUTPUT}
# Diff the two files.
$DIFF $GOODOUTPUT $TESTOUTPUT > $DIFFOUTPUT 2>&1 || (
# They are different!
echo "******************** TEST ($WHICHOUTPUT) '$PROG' FAILED! ********************"
echo "Execution Context Diff:"
head -n 200 $DIFFOUTPUT | cat -v
rm $DIFFOUTPUT
echo "******************** TEST ($WHICHOUTPUT) '$PROG' ****************************"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bogomolovmikhail/llvm-test-suite.git
git@gitee.com:bogomolovmikhail/llvm-test-suite.git
bogomolovmikhail
llvm-test-suite
llvm-test-suite
main

搜索帮助