Skip to content

Commit aa53c09

Browse files
Jiri Olsaacmel
authored andcommitted
perf tests: Adding build test for having ending double slash
Pawel Moll reported build issue for having extra slash (/) at the end of the prefix variable. $ make prefix=/usr/local/ CC tests/attr.o tests/attr.c: In function ‘test__attr’: tests/attr.c:168:50: error: expected ‘)’ before ‘;’ token snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR); ^ tests/attr.c:176:1: error: expected ‘;’ before ‘}’ token } ^ tests/attr.c:176:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1: all warnings being treated as errors Adding automated test case for this. Reported-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20150727182417.GD20509@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent c421e80 commit aa53c09

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

  • tools/perf/tests

‎tools/perf/tests/make‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ make_install_man := install-man
5858
make_install_html := install-html
5959
make_install_info := install-info
6060
make_install_pdf := install-pdf
61-
make_install_prefix := install prefix=/tmp/krava
61+
make_install_prefix := install prefix=/tmp/krava
62+
make_install_prefix_slash := install prefix=/tmp/krava/
6263
make_static := LDFLAGS=-static
6364

6465
# all the NO_* variable combined
@@ -101,6 +102,7 @@ run += make_util_pmu_bison_o
101102
run += make_install
102103
run += make_install_bin
103104
run += make_install_prefix
105+
run += make_install_prefix_slash
104106
# FIXME 'install-*' commented out till they're fixed
105107
# run += make_install_doc
106108
# run += make_install_man
@@ -175,11 +177,14 @@ test_make_install_O := $(call test_dest_files,$(installed_files_all))
175177
test_make_install_bin := $(call test_dest_files,$(installed_files_bin))
176178
test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
177179

178-
# We prefix all installed files for make_install_prefix
180+
# We prefix all installed files for make_install_prefix(_slash)
179181
# with '/tmp/krava' to match installed/prefix-ed files.
180182
installed_files_all_prefix := $(addprefix /tmp/krava/,$(installed_files_all))
181-
test_make_install_prefix := $(call test_dest_files,$(installed_files_all_prefix))
182-
test_make_install_prefix_O := $(call test_dest_files,$(installed_files_all_prefix))
183+
test_make_install_prefix := $(call test_dest_files,$(installed_files_all_prefix))
184+
test_make_install_prefix_O := $(call test_dest_files,$(installed_files_all_prefix))
185+
186+
test_make_install_prefix_slash := $(test_make_install_prefix)
187+
test_make_install_prefix_slash_O := $(test_make_install_prefix_O)
183188

184189
# FIXME nothing gets installed
185190
test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1

0 commit comments

Comments
 (0)