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

NetBSD fixes #110

Open
0-wiz-0 opened this issue Feb 6, 2017 · 0 comments
Open

NetBSD fixes #110

0-wiz-0 opened this issue Feb 6, 2017 · 0 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Feb 6, 2017

Please take a look at https://github.com/0-wiz-0/kati
Most of the patches should be ok for merging; the last three definitely are not and are just there to show issues:

  • /bin/bash is hardcoded, but might not exist
  • make is expected to be GNU make, but on BSD's that is BSD make; GNU make there is called gmake
  • NetBSD's gcc does not support -march=native (not sure why)

As of today, the fork is down to 24 test failures. Here's the test output:

ruby runtest.rb -c -n
abspath.mk: PASS
addprefix.mk: PASS
addsuffix.mk: PASS
and.mk: PASS
append_self_reference.mk: PASS
assign_after_tab.mk: PASS
assign_in_parens.mk: PASS
assign_types.mk: PASS
assign_with_trailing_space.mk: PASS
auto_var_suffixes.mk: FAIL
--- out.make	2017-02-06 11:22:51.486406875 +0100
+++ out.kati	2017-02-06 11:22:51.486447732 +0100
@@ -24,8 +24,8 @@
 afile bfile
 
 === FILES ===
+tdir
 adir
 bdir
 afile
 bfile
-tdir
auto_vars.mk: PASS
autovar_assign.mk: FAIL (expected)
backslash_before_empty_line.mk: PASS
backslash_before_special_character.mk: PASS
backslash_in_rule_command.mk: PASS
basename.mk: PASS
basic_dep.mk: PASS
basic_rule.mk: PASS
basic_var.mk: PASS
blank_line_before_command.mk: FAIL (expected)
build_once.mk: PASS
builtin_rules.mk: FAIL
--- out.make	2017-02-06 11:22:52.008918486 +0100
+++ out.kati	2017-02-06 11:22:52.008966676 +0100
@@ -6,7 +6,7 @@
 === test2 ===
 
 === FILES ===
+foo.o
 foo.c
 bar.cc
-foo.o
 bar.o
builtin_vars.mk: PASS
call.mk: PASS
call_with_many_args.mk: PASS
call_with_whitespace.mk: PASS
canned_recipes.mk: PASS
circular_dep.mk: FAIL (expected)
close_paren_without_open.mk: PASS
colon_ws_in_file.mk: FAIL (expected)
colon_ws_in_target.mk: FAIL (expected)
command_vars.mk: PASS
comment.mk: PASS
comment_in_command.mk: PASS
comment_in_define.mk: PASS
cond_syntax.mk: PASS
crlf.mk: PASS
crlf_after_directive.mk: PASS
curdir.mk: PASS
curdir_implicit_rule.mk: PASS
curdir_var.mk: PASS
default_rule.mk: PASS
define.mk: PASS
define_newline.mk: PASS
define_verbatim.mk: PASS
define_with_comments.mk: PASS
delete_on_error.mk: FAIL (expected)
dir.mk: PASS
directive_after_tab.mk: PASS
dollar_in_file.mk: PASS
dot_rule.mk: PASS
double_colon_rule.mk: PASS
else_if.mk: PASS
empty_line_in_define.mk: PASS
empty_output.mk: PASS
empty_target_specific_var.mk: FAIL
--- out.make	2017-02-06 11:22:53.721179237 +0100
+++ out.kati	2017-02-06 11:22:53.721225611 +0100
@@ -1,5 +1,5 @@
 === test ===
-Makefile:3: *** empty variable name.
+PASS
 
 === FILES ===
 
empty_target_specific_var2.mk: FAIL
--- out.make	2017-02-06 11:22:53.735892871 +0100
+++ out.kati	2017-02-06 11:22:53.735932680 +0100
@@ -1,5 +1,5 @@
 ===  ===
-Makefile:7: *** empty variable name.
+PASS
 
 === FILES ===
 
empty_var_cmd.mk: PASS
envvar.mk: PASS
equal_and_semi_in_rule.mk: PASS
equal_in_target.mk: FAIL (expected)
err_both_colon.mk: PASS
err_empty_output.mk: PASS
err_empty_var_name.mk: PASS
err_error.mk: PASS
err_error_in_recipe.mk: FAIL
--- out.make	2017-02-06 11:22:53.835878730 +0100
+++ out.kati	2017-02-06 11:22:53.835918958 +0100
@@ -1,4 +1,5 @@
 === test ===
+/usr/pkg/bin/bash -c "echo -e \"Makefile:2: *** foo.\" 2>&1 && false"
 Makefile:2: *** foo.
 
 === FILES ===
err_export_override.mk: PASS (unexpected)
err_extra_else.mk: PASS
err_extra_endif.mk: PASS
err_ifdef_two_args.mk: PASS
err_ifdef_two_args2.mk: PASS
err_ifdef_with_leading_space.mk: PASS
err_include.mk: PASS
err_invalid_else.mk: PASS
err_invalid_ifeq.mk: PASS
err_invalid_ifeq2.mk: PASS
err_invalid_ifeq3.mk: PASS
err_invalid_ifeq4.mk: PASS
err_invalid_ifeq5.mk: FAIL (expected)
err_keyword_in_rule.mk: PASS
err_missing_endef.mk: PASS
err_missing_endif.mk: PASS
err_missing_sep.mk: PASS
err_no_rule.mk: PASS
err_no_target_commands.mk: PASS
err_no_target_commands2.mk: PASS
err_override.mk: PASS
err_override_export.mk: PASS (unexpected)
err_pattern_rule_only.mk: PASS
err_semicolon.mk: PASS
err_semicolon2.mk: PASS
err_semicolon3.mk: PASS
err_semicolon4.mk: PASS
err_semicolon_in_output.mk: PASS
err_suffixes.mk: FAIL (expected)
err_suffixes2.mk: PASS
err_two_else.mk: PASS
err_unmatched_endef.mk: PASS
err_unterminated_func.mk: PASS
err_unterminated_var.mk: PASS
err_word_non_numeric.mk: PASS
err_word_zero.mk: PASS
escape_for_shell_in_recipe.mk: FAIL (expected)
escaped_backslash.mk: PASS
escaped_comment.mk: PASS
escaped_wildcard.mk: FAIL
--- out.make	2017-02-06 11:22:54.497896571 +0100
+++ out.kati	2017-02-06 11:22:54.497946717 +0100
@@ -3,7 +3,7 @@
 === FILES ===
 foo
 === test2 ===
-
+foo
 
 === FILES ===
 foo
eval.mk: FAIL
--- out.make	2017-02-06 11:22:54.768044711 +0100
+++ out.kati	2017-02-06 11:22:54.768086406 +0100
@@ -12,13 +12,13 @@
 client.o client_api.o client_mem.o -o client
 
 === FILES ===
+server.o
 server.c
 server_priv.c
 server_access.c
 client.c
 client_api.c
 client_mem.c
-server.o
 server_priv.o
 server_access.o
 client.o
eval_assign.mk: PASS
eval_starts_with_comment.mk: PASS
excl_in_shell.mk: PASS
expanded_nl.mk: PASS
explicit_pattern_rule.mk: PASS
export.mk: PASS
export_export.mk: FAIL (expected)
fail_ignore_error.mk: FAIL
--- out.make	2017-02-06 11:22:54.931814117 +0100
+++ out.kati	2017-02-06 11:22:54.931863983 +0100
@@ -1,5 +1,6 @@
 === test ===
 *** [test] Error 1
+/usr/pkg/bin/bash -c "(false ) && (false ; true ) && (echo FAIL )"
 
 === FILES ===
 
fail_subshell_in_recipe.mk: FAIL
--- out.make	2017-02-06 11:22:54.947846205 +0100
+++ out.kati	2017-02-06 11:22:54.947885944 +0100
@@ -1,5 +1,6 @@
 === test ===
 *** [test] Error 1
+/usr/pkg/bin/bash -c "(false ) && ((true) ; echo FAIL )"
 
 === FILES ===
 
filter-out.mk: PASS
filter.mk: PASS
find_command.mk: FAIL (expected)
find_command_sorted.mk: FAIL (expected)
findstring.mk: PASS
first_rule.mk: PASS
firstword.mk: PASS
flavor.mk: PASS
foreach.mk: PASS
func_backslash.mk: PASS
func_nop.mk: PASS
func_with_backslash.mk: PASS
hash_in_var.mk: PASS
if.mk: PASS
if_recipe.mk: PASS
ifdef_rec_var.mk: PASS
ifdef_ret_in_arg.mk: PASS
ifdef_with_comments.mk: PASS
ifdef_with_trailing_space.mk: PASS
ifeq_without_parens.mk: PASS
ignore_error.mk: PASS
implicit_pattern_rule.mk: PASS
implicit_pattern_rule_chain.mk: PASS
implicit_pattern_rule_chain2.mk: FAIL (expected)
implicit_pattern_rule_for_no_commands.mk: PASS
implicit_pattern_rule_phony.mk: PASS
implicit_pattern_rule_prefix.mk: PASS
include.mk: PASS
include_glob.mk: PASS
include_glob_order.mk: PASS
include_var.mk: PASS
info.mk: PASS
join.mk: PASS
last_resort.mk: PASS
lastword.mk: PASS
lineno_in_call.mk: PASS
makecmdgoals.mk: PASS
makefile_list.mk: FAIL
--- out.make	2017-02-06 11:22:57.854456066 +0100
+++ out.kati	2017-02-06 11:22:57.854501602 +0100
@@ -7,17 +7,17 @@
 Makefile foo.mk foo.mk foo.mk
 
 === FILES ===
-foo.mk
 bar.mk
+foo.mk
 === test3 ===
 Makefile foo.mk bar.mk bar.mk foo.mk foo.mk
 
 === FILES ===
-foo.mk
 bar.mk
+foo.mk
 === test4 ===
 PASS
 
 === FILES ===
-foo.mk
 bar.mk
+foo.mk
merge_inputs.mk: PASS
merge_output_pattern.mk: PASS
merge_target_specific_vars.mk: PASS
multi_explicit_output_patterns.mk: PASS
multi_explicit_output_patterns_double_colon.mk: FAIL (expected)
multi_implicit_output_patterns.mk: PASS
multi_outputs.mk: PASS
multi_pattern_rule.mk: PASS
multi_rule.mk: PASS
multi_rule_order_only.mk: PASS
multi_suffix_rule.mk: PASS
multiline_and_leading_space.mk: PASS
multiline_and_lineno.mk: PASS
multiline_arg.mk: FAIL
--- out.make	2017-02-06 11:22:58.346097909 +0100
+++ out.kati	2017-02-06 11:22:58.346139953 +0100
@@ -5,7 +5,7 @@
 INFO:  foo
 INFO:  \
 foo
-\
+
 
 === FILES ===
 
multiline_define.mk: PASS
multiline_recipe.mk: FAIL (expected)
multiple_output_patterns.mk: PASS
nested_call.mk: PASS
nested_define.mk: PASS
ninja_normalized_path.mk: FAIL (expected)
no_last_newline.mk: PASS
not_command_with_tab.mk: PASS
notdir.mk: PASS
nothing_to_do.mk: PASS
or.mk: PASS
order_only.mk: FAIL
--- out.make	2017-02-06 11:22:59.681289871 +0100
+++ out.kati	2017-02-06 11:22:59.681343230 +0100
@@ -7,6 +7,6 @@
 PASS_foo
 
 === FILES ===
+baz
 foo
 bar
-baz
order_only2.mk: FAIL (expected)
origin.mk: PASS
override.mk: PASS
override_define.mk: PASS
override_export.mk: FAIL (expected)
override_override.mk: PASS
override_rule.mk: PASS
param.mk: FAIL (expected)
patsubst.mk: PASS
pattern_rules_priority.mk: PASS
phony.mk: PASS
posix_var.mk: PASS
preserve_single_dot.mk: PASS
quine.mk: PASS
realpath.mk: PASS
recipe_in_rule.mk: PASS
recipe_var.mk: PASS
recursive_command_expansion.mk: PASS
recursive_marker.mk: PASS
rule_in_var.mk: PASS
rule_with_extra_ws.mk: PASS
semi_in_var.mk: PASS
semicolon.mk: PASS
semicolon_in_var.mk: PASS
shell.mk: FAIL
--- out.make	2017-02-06 11:23:00.541626427 +0100
+++ out.kati	2017-02-06 11:23:00.541680344 +0100
@@ -1,13 +1,19 @@
 === test ===
 /disk/6/archive/foreign/kati/out/shell.mk
 
-na n b n
-na n b n X
-X-e nnY
-X-e annY
-X-e nnbY
-X-e nnbY
-X-e nnnbY
+
+a 
+ b 
+
+
+a 
+ b 
+ X
+X-e \n\nY
+X-e a\n\nY
+X-e \n\nbY
+X-e \n\nbY
+X-e \n\n\nbY
 X-e bY
 X-e b Y
 
shell_arith_in_recipe.mk: PASS
shell_stderr.mk: PASS
shell_var.mk: PASS
shell_var_with_args.mk: FAIL
--- out.make	2017-02-06 11:23:00.749555728 +0100
+++ out.kati	2017-02-06 11:23:00.749596934 +0100
@@ -3,10 +3,9 @@
             [-C directory] [-D variable] [-d flags] [-f makefile]
             [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
             [-V variable] [variable=value] [target ...]
-": not found
-
-": not found
-*** [test] Error 127
+foo
+cmd: echo baz
+baz
 
 === FILES ===
 
silent.mk: PASS
silent_ignore_error.mk: PASS
silent_multiline.mk: PASS
sort.mk: PASS
static_pattern.mk: PASS
stem.mk: PASS
strip.mk: PASS
strip_and_shell.mk: FAIL (expected)
submake_basic.mk: FAIL (expected)
subshell_in_recipe.mk: PASS
subst.mk: PASS
subst2.mk: PASS
suffix.mk: PASS
suffix_rule.mk: PASS
suffix_subst.mk: PASS
suffix_subst_pat.mk: PASS
tab_comment.mk: PASS
tab_only_line.mk: PASS
target_specific_var.mk: PASS
target_specific_var_append.mk: PASS
target_specific_var_in_var.mk: PASS
target_specific_var_ref.mk: PASS
target_specific_var_simple.mk: PASS
target_specific_var_timing.mk: PASS
target_specific_var_var_name.mk: PASS
target_specific_var_with_pattern.mk: PASS
target_specific_var_with_semi.mk: PASS
terms_in_parens.mk: PASS
trim_leading_curdir.mk: PASS
unmatched_paren.mk: PASS
unmatched_paren2.mk: PASS
value.mk: PASS
var_append.mk: PASS
var_cond_assign.mk: PASS
var_eval.mk: PASS
var_target.mk: PASS
var_with_space.mk: FAIL
--- out.make	2017-02-06 11:23:01.675907240 +0100
+++ out.kati	2017-02-06 11:23:01.675951519 +0100
@@ -3,7 +3,8 @@
             [-C directory] [-D variable] [-d flags] [-f makefile]
             [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
             [-V variable] [variable=value] [target ...]
-Makefile:10: *** missing separator.
+PASS
+PASS2
 
 === FILES ===
 
vardef_in_call.mk: PASS
vpath.mk: FAIL (expected)
vpath_directive.mk: FAIL (expected)
warn_extra_trailings.mk: FAIL (expected)
warn_output_pattern_mismatch.mk: PASS
warning.mk: PASS
warning_in_eval.mk: PASS
whitespace_in_cmd.mk: PASS
wildcard.mk: PASS
wildcard_cache.mk: PASS (unexpected)
wildcard_multi.mk: PASS
wildcard_target.mk: FAIL (expected)
wildcard_with_commas.mk: PASS
wildcard_with_var.mk: PASS
word.mk: PASS
wordlist.mk: PASS
words.mk: PASS
cmdline_var.sh: PASS
cmdline_var_makeflags.sh: PASS
cmdline_var_modify.sh: PASS
cmdline_var_override.sh: PASS
file_func.sh: PASS
kati_cache.sh: PASS
ninja_mkdir.sh: PASS
./build.ninja is missing, regenerating...
./build.ninja is missing, regenerating...
./build.ninja is missing, regenerating...
ninja_phony_targets.sh: PASS
ninja_pool.sh: PASS
ninja_regen.sh: PASS
ninja_regen_filefunc_read.sh: FAIL
--- out.make	2017-02-06 11:23:10.003122773 +0100
+++ out.kati	2017-02-06 11:23:10.003176970 +0100
@@ -0,0 +1,5 @@
+foo
+foo
+foo
+foo
+foo
ninja_regen_filefunc_write.sh: PASS
ninja_regen_find_link.sh: FAIL
--- out.make	2017-02-06 11:23:10.109914960 +0100
+++ out.kati	2017-02-06 11:23:10.109969366 +0100
@@ -1,3 +1,3 @@
 linkdir/d/link linkdir/d/link/file1
-linkdir/d/link linkdir/d/link/file1 linkdir/d/link/file1_2
-linkdir/d/link linkdir/d/link/file2
+linkdir/d/link linkdir/d/link/file1
+linkdir/d/link linkdir/d/link/file1
ninja_regen_glob.sh: PASS
phony_targets.sh: PASS
readonly_global.sh: FAIL
--- out.make	2017-02-06 11:23:10.240105409 +0100
+++ out.kati	2017-02-06 11:23:10.240219459 +0100
@@ -1,24 +1,16 @@
 Testcase: = = =
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: = += =
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: = := =
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: = := :=
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: = := +=
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: := := :=
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: := := +=
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
 Testcase: := := =
-Nothing to be done for "all".
-Clean exit
+Makefile:3: *** cannot assign to readonly variable: FOO
readonly_global_missing.sh: FAIL
--- out.make	2017-02-06 11:23:10.251811768 +0100
+++ out.kati	2017-02-06 11:23:10.251862473 +0100
@@ -1,2 +1 @@
-Nothing to be done for "all".
-Clean exit
+Makefile:2: *** unknown variable: FOO
readonly_rule.sh: FAIL
--- out.make	2017-02-06 11:23:10.263493404 +0100
+++ out.kati	2017-02-06 11:23:10.263545017 +0100
@@ -1,3 +1,2 @@
 Testcase: := := +=
-Nothing to be done for "all".
-Clean exit
+Makefile:4: *** cannot assign to readonly variable: FOO
readonly_rule_missing.sh: FAIL
--- out.make	2017-02-06 11:23:10.275079987 +0100
+++ out.kati	2017-02-06 11:23:10.275123708 +0100
@@ -1,2 +1 @@
-Nothing to be done for "all".
-Clean exit
+Makefile:2: *** unknown variable: FOO

=== Expected failures ===
autovar_assign.mk
blank_line_before_command.mk
circular_dep.mk
colon_ws_in_file.mk
colon_ws_in_target.mk
delete_on_error.mk
equal_in_target.mk
err_invalid_ifeq5.mk
err_suffixes.mk
escape_for_shell_in_recipe.mk
export_export.mk
find_command.mk
find_command_sorted.mk
implicit_pattern_rule_chain2.mk
multi_explicit_output_patterns_double_colon.mk
multiline_recipe.mk
ninja_normalized_path.mk
order_only2.mk
override_export.mk
param.mk
strip_and_shell.mk
submake_basic.mk
vpath.mk
vpath_directive.mk
warn_extra_trailings.mk
wildcard_target.mk
=== Unexpected passes ===
err_export_override.mk
err_override_export.mk
wildcard_cache.mk
=== Failures ===
auto_var_suffixes.mk
builtin_rules.mk
empty_target_specific_var.mk
empty_target_specific_var2.mk
err_error_in_recipe.mk
escaped_wildcard.mk
eval.mk
fail_ignore_error.mk
fail_subshell_in_recipe.mk
makefile_list.mk
multiline_arg.mk
order_only.mk
shell.mk
shell_var_with_args.mk
var_with_space.mk
ninja_regen_filefunc_read.sh
ninja_regen_find_link.sh
readonly_global.sh
readonly_global_missing.sh
readonly_rule.sh
readonly_rule_missing.sh

FAIL! (24 fails 232 passes)
Makefile:21: recipe for target 'test' failed
gmake: *** [test] Error 1

Do you have suggestions on how to fix the issues and the failing tests?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant