Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor test RUN commands into a separate tool #355

Draft
wants to merge 5 commits into
base: test-command-refactoring.base
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions clang/test/3C/3c-regtest-unconvert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python
#
# 3c-regtest-unconvert.py can be used to verify that an existing 3C regression
# test with a written-out RUN script has been correctly converted to use
# 3c-regtest.py.
#
# Usage: 3c-regtest-unconvert.py TEST_FILE
#
# This verifies that the TEST_FILE contains a 3c-regtest.py RUN command in
# canonical form and then prints the TEST_FILE with this RUN command replaced by
# the generated RUN script. The output should be identical to the test file
# before conversion to 3c-regtest.py.

import sys
import re
import argparse

import script_generator

parser = argparse.ArgumentParser(description='''\
Converts a 3C regression test that uses 3c-regtest.py back to one with a
written-out RUN script so you can verify that a test was correctly converted to
use 3c-regtest.py.\
''')
# TODO: Add help
parser.add_argument('test_file')

argobj = parser.parse_args()

with open(argobj.test_file) as f:
lines = f.readlines()

new_lines = []
for l in lines:
if '3c-regtest' in l:
m = re.search(r"\A// RUN: %S/3c-regtest\.py (.*) %s -t %t --clang '%clang'\n\Z", l)
if m is None:
sys.exit('Non-canonical 3c-regtest RUN line: %s' % l) # XXX Trailing newline
test_type_flags_joined = m.group(1)

# FUTURE: Will we need to handle quoting?
test_type_flags = test_type_flags_joined.split(' ')
# XXX: This just exits on error. We'd like to add a more meaningful message, but
# the default Python version on gamera (2.7.18) is too old to support
# exit_on_error=False.
test_type_argobj = script_generator.parser.parse_args(test_type_flags + [argobj.test_file])

run_lines = [('// RUN: %s\n' % cmd if cmd != '' else '\n')
for cmd in script_generator.generate_commands(test_type_argobj)]
new_lines.extend(run_lines)
else:
new_lines.append(l)

sys.stdout.write(''.join(new_lines))
19 changes: 19 additions & 0 deletions clang/test/3C/3c-regtest-verify-all-conversions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Usage: ./3c-regtest-verify-all-conversions.sh BASE_TREEISH
#
# BASE_TREEISH has the original versions of the tests to compare to. Typically,
# it would be origin/test-command-refactoring.verify-base .
#
# This takes a little while, so you may want to redirect the output to a file
# and view it later

set -e
set -o pipefail
base_commit="$1"
git rev-parse "$base_commit^{tree}" &>/dev/null || { echo >&2 'Invalid base tree'; exit 1; }

for f in $(git grep --files-with-matches '3c-regtest' *.c); do
./3c-regtest-unconvert.py $f | {
diff --label $f.orig --label $f.unconvert -u <(git show "$base_commit":./$f) - || [ $? == 1 ]
}
done
96 changes: 96 additions & 0 deletions clang/test/3C/3c-regtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env python
#
# 3c-regtest.py: Run a 3C regression test using a standard RUN script.
#
# 3c-regtest.py is intended to be invoked by a single RUN command in the test
# file. The canonical form is:
#
# // RUN: %S/3c-regtest.py TEST_TYPE_FLAGS %s -t %t --clang '%clang'
#
# 3c-regtest.py generates a RUN script based on the TEST_TYPE_FLAGS (using
# script_generator.py) and runs it using code from `lit`.
#
# The -t and --clang flags are used to pass substitution values from the outer
# `lit` configuration so that 3c-regtest.py knows what to substitute for
# occurrences of %t and %clang in its script. We'll add flags like this for all
# % codes that appear in the scripts.

# TODO: Add Windows compatibility code once we have an easy way to test on
# Windows.

import sys
import os
import platform
import argparse

import script_generator

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) +
'/../../../llvm/utils/lit')
import lit.TestRunner

parser = argparse.ArgumentParser(description='Run a 3C regression test.',
parents=[script_generator.parser])
# Substitution arguments. The test file name is already in
# script_generator.parser.
parser.add_argument('-t')
parser.add_argument('--clang')

argobj = parser.parse_args()

test_dir = os.path.dirname(os.path.abspath(argobj.test_file))

tmpName = argobj.t
tmpBase = script_generator.remove_suffix(tmpName, '.tmp')
if tmpBase is None:
sys.exit('-t argument %s does not end with .tmp' % tmpName)

# `lit` supports more substitutions, but these are the only ones needed by the
# tests that use 3c-regtest.py so far.
substitutions = [
# #_MARKER_# is a hack copied from getDefaultSubstitutions in
# llvm/utils/lit/lit/TestRunner.py. To explain it a bit more fully:
# applySubstitutions processes each before/after pair in turn and replaces
# all occurrences. So if we simply put ('%%', '%') as either the first or
# last pair, there is a risk of a % being interpreted as part of a %s, etc.
# Instead, we temporarily replace %% with a string that doesn't contain %
# and that we assume doesn't occur elsewhere in the commands. The "proper"
# way to implement this kind of substitution processing is to make one pass
# over the input from left to right, replacing codes as they are found, but
# apparently that wasn't worth the extra code in `lit`.
('%%', '#_MARKER_#'),
('%s', argobj.test_file),
('%S', test_dir),
('%t', tmpName),
('%clang', argobj.clang),
('#_MARKER_#', '%')
]

commands = [cmd for cmd in script_generator.generate_commands(argobj) if cmd != '']
commands = lit.TestRunner.applySubstitutions(commands, substitutions)

class FakeTestConfig:
def __init__(self):
self.pipefail = True # Is this always OK?
self.environment = dict(os.environ)

class FakeTest:
def __init__(self):
self.config = FakeTestConfig()

class FakeLitConfig:
def __init__(self):
self.isWindows = platform.system() == 'windows'
# Let the calling `lit` handle any timeout.
self.maxIndividualTestTime = 0

res = lit.TestRunner.executeScriptInternal(
FakeTest(), FakeLitConfig(), tmpBase, commands, os.getcwd())
if isinstance(res, lit.Test.Result):
die('Error: executeScriptInternal returned unexpected Result(%s, %r)' %
(res.code.name, res.output))

out, err, exitCode, timeoutInfo = res
sys.stdout.write(out)
sys.stderr.write(err)
sys.exit(exitCode)
7 changes: 1 addition & 6 deletions clang/test/3C/3d-allocation.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -output-postfix=checked -alltypes %s
// RUN: 3c -alltypes %S/3d-allocation.checked.c -- | count 0
// RUN: rm %S/3d-allocation.checked.c
// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang'

#include <stdio.h>
#include <stdlib.h>
Expand Down
7 changes: 1 addition & 6 deletions clang/test/3C/alloc_type_param.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -output-postfix=checked -alltypes %s
// RUN: 3c -alltypes %S/alloc_type_param.checked.c -- | count 0
// RUN: rm %S/alloc_type_param.checked.c
// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang'

#include <stddef.h>
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
Expand Down
7 changes: 1 addition & 6 deletions clang/test/3C/amper.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -output-postfix=checked -alltypes %s
// RUN: 3c -alltypes %S/amper.checked.c -- | count 0
// RUN: rm %S/amper.checked.c
// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang'

void foo(int *x) {
//CHECK: void foo(int *x : itype(_Ptr<int>)) {
Expand Down
8 changes: 1 addition & 7 deletions clang/test/3C/arrboth.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -

// RUN: 3c -alltypes -output-postfix=checked %s
// RUN: 3c -alltypes %S/arrboth.checked.c -- | count 0
// RUN: rm %S/arrboth.checked.c
// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrbothmulti1.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrbothmulti2.c
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrbothmulti2.c
// RUN: %clang -c %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti1.checkedNOALL.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti1.checkedALL.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrbothmulti2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c
// RUN: test ! -f %S/arrbothmulti1.checked.convert_again.c
// RUN: test ! -f %S/arrbothmulti2.checked.convert_again.c
// RUN: rm %S/arrbothmulti1.checkedALL.c %S/arrbothmulti2.checkedALL.c
// RUN: rm %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c
// RUN: rm %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrbothmulti2.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrbothmulti1.c %s
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrbothmulti1.c %s
// RUN: %clang -c %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti2.checkedNOALL2.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti2.checkedALL2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrbothmulti1.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c
// RUN: test ! -f %S/arrbothmulti1.checked2.convert_again.c
// RUN: test ! -f %S/arrbothmulti2.checked2.convert_again.c
// RUN: rm %S/arrbothmulti1.checkedALL2.c %S/arrbothmulti2.checkedALL2.c
// RUN: rm %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c
// RUN: rm %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
8 changes: 1 addition & 7 deletions clang/test/3C/arrcallee.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -

// RUN: 3c -alltypes -output-postfix=checked %s
// RUN: 3c -alltypes %S/arrcallee.checked.c -- | count 0
// RUN: rm %S/arrcallee.checked.c
// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrcalleemulti1.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcalleemulti2.c
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcalleemulti2.c
// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti1.checkedNOALL.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti1.checkedALL.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcalleemulti2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c
// RUN: test ! -f %S/arrcalleemulti1.checked.convert_again.c
// RUN: test ! -f %S/arrcalleemulti2.checked.convert_again.c
// RUN: rm %S/arrcalleemulti1.checkedALL.c %S/arrcalleemulti2.checkedALL.c
// RUN: rm %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c
// RUN: rm %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrcalleemulti2.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcalleemulti1.c %s
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcalleemulti1.c %s
// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti2.checkedNOALL2.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti2.checkedALL2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcalleemulti1.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c
// RUN: test ! -f %S/arrcalleemulti1.checked2.convert_again.c
// RUN: test ! -f %S/arrcalleemulti2.checked2.convert_again.c
// RUN: rm %S/arrcalleemulti1.checkedALL2.c %S/arrcalleemulti2.checkedALL2.c
// RUN: rm %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c
// RUN: rm %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
8 changes: 1 addition & 7 deletions clang/test/3C/arrcaller.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -

// RUN: 3c -alltypes -output-postfix=checked %s
// RUN: 3c -alltypes %S/arrcaller.checked.c -- | count 0
// RUN: rm %S/arrcaller.checked.c
// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrcallermulti1.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcallermulti2.c
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcallermulti2.c
// RUN: %clang -c %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti1.checkedNOALL.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti1.checkedALL.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcallermulti2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c
// RUN: test ! -f %S/arrcallermulti1.checked.convert_again.c
// RUN: test ! -f %S/arrcallermulti2.checked.convert_again.c
// RUN: rm %S/arrcallermulti1.checkedALL.c %S/arrcallermulti2.checkedALL.c
// RUN: rm %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c
// RUN: rm %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrcallermulti2.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcallermulti1.c %s
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcallermulti1.c %s
// RUN: %clang -c %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti2.checkedNOALL2.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti2.checkedALL2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcallermulti1.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c
// RUN: test ! -f %S/arrcallermulti1.checked2.convert_again.c
// RUN: test ! -f %S/arrcallermulti2.checked2.convert_again.c
// RUN: rm %S/arrcallermulti1.checkedALL2.c %S/arrcallermulti2.checkedALL2.c
// RUN: rm %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c
// RUN: rm %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
8 changes: 1 addition & 7 deletions clang/test/3C/arrinstructboth.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -

// RUN: 3c -alltypes -output-postfix=checked %s
// RUN: 3c -alltypes %S/arrinstructboth.checked.c -- | count 0
// RUN: rm %S/arrinstructboth.checked.c
// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
13 changes: 1 addition & 12 deletions clang/test/3C/arrinstructbothmulti1.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructbothmulti2.c
// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructbothmulti2.c
// RUN: %clang -c %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedNOALL.c %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedALL.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructbothmulti2.c %s
// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c
// RUN: test ! -f %S/arrinstructbothmulti1.checked.convert_again.c
// RUN: test ! -f %S/arrinstructbothmulti2.checked.convert_again.c
// RUN: rm %S/arrinstructbothmulti1.checkedALL.c %S/arrinstructbothmulti2.checkedALL.c
// RUN: rm %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c
// RUN: rm %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c
// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang'


/*********************************************************************************/
Expand Down
Loading