Skip to content

Commit 774abc1

Browse files
committed
Synchronise goto-cc command-line options to re-enable Windows regression tests
object-bits was not supported by all of goto-cc's command-line front-end variants. While at it, also make other options consistently available.
1 parent 16ed35a commit 774abc1

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
if(WIN32)
22
set(is_windows true)
3-
set(exclude_broken_windows_tests -X winbug)
43
else()
54
set(is_windows false)
6-
set(exclude_broken_windows_tests "")
75
endif()
86

97
add_test_pl_tests(
10-
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:cbmc> ${is_windows}" ${exclude_broken_windows_tests}
8+
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:cbmc> ${is_windows}"
119
)

regression/goto-cc-cbmc-shared-options/object-bits/fewer_bits.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE winbug
1+
CORE
22
test.c
33
--function main --object-bits 6
44
^EXIT=10$

regression/goto-cc-cbmc-shared-options/object-bits/more_bits.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE winbug
1+
CORE
22
test.c
33
--function main --object-bits 10
44
^EXIT=10$

src/goto-cc/armcc_cmdline.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Author: Daniel Kroening
2525
/// \return none
2626
// see
2727
// http://infocenter.arm.com/help/topic/com.arm.doc.dui0472c/Cchbggjb.html
28-
28+
// clang-format off
2929
static const char *options_no_arg[]=
3030
{
3131
// goto-cc-specific
@@ -44,6 +44,9 @@ static const char *options_no_arg[]=
4444
"--no-arch",
4545
"--no-library",
4646
"--string-abstraction",
47+
"--validate-goto-model",
48+
"-?",
49+
"--export-file-local-symbols",
4750

4851
// armcc
4952
"--help",
@@ -201,7 +204,6 @@ static const char *options_no_arg[]=
201204
nullptr
202205
};
203206

204-
// clang-format off
205207
static const std::vector<std::string> options_with_prefix
206208
{
207209
"--project=",
@@ -256,6 +258,9 @@ static const std::vector<std::string> options_with_arg
256258
// goto-cc specific
257259
"--verbosity",
258260
"--function",
261+
"--print-rejected-preprocessed-source",
262+
"--mangle-suffix",
263+
"--object-bits",
259264

260265
// armcc-specific
261266
"-D",

src/goto-cc/bcc_cmdline.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Author: Michael Tautschnig
1616

1717
#include <util/prefix.h>
1818

19+
// clang-format off
1920
// non-bcc options
2021
const char *goto_bcc_options_with_argument[]=
2122
{
@@ -24,6 +25,8 @@ const char *goto_bcc_options_with_argument[]=
2425
"--native-compiler",
2526
"--native-linker",
2627
"--print-rejected-preprocessed-source",
28+
"--mangle-suffix",
29+
"--object-bits",
2730
nullptr
2831
};
2932

@@ -66,6 +69,7 @@ const char *bcc_options_with_argument[]=
6669
"-t",
6770
nullptr
6871
};
72+
// clang-format on
6973

7074
bool bcc_cmdlinet::parse(int argc, const char **argv)
7175
{

src/goto-cc/ms_cl_cmdline.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const char *non_ms_cl_options[]=
4848
"--validate-goto-model",
4949
"--export-file-local-symbols",
5050
"--mangle-suffix",
51+
"--object-bits",
5152
nullptr
5253
};
5354
// clang-format on
@@ -63,7 +64,7 @@ bool ms_cl_cmdlinet::parse(const std::vector<std::string> &arguments)
6364

6465
if(
6566
arguments[i] == "--verbosity" || arguments[i] == "--function" ||
66-
arguments[i] == "--mangle-suffix")
67+
arguments[i] == "--mangle-suffix" || arguments[i] == "--object-bits")
6768
{
6869
if(i < arguments.size() - 1)
6970
{

src/goto-cc/ms_link_cmdline.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ Author: Daniel Kroening
1919

2020
#include <util/unicode.h>
2121

22+
// clang-format off
2223
/// parses the command line options into a cmdlinet
2324
/// \par parameters: argument count, argument strings
2425
/// \return none
2526
const char *non_ms_link_options[]=
2627
{
2728
"--help",
28-
"--verbosity"
29+
"--verbosity",
30+
"--validate-goto-model"
2931
};
32+
// clang-format on
3033

3134
bool ms_link_cmdlinet::parse(const std::vector<std::string> &arguments)
3235
{

0 commit comments

Comments
 (0)