about summary refs log tree commit diff
path: root/conform/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-08-31 21:19:51 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-08-31 21:19:51 +0000
commit2bbd06bcee5fe62896d71f78c6c2b6d0f3a23467 (patch)
tree4c28e38e786a26898976945861a014d591a94b2a /conform/Makefile
parent81b9d87bae23efc42e2121ac066fe38fceb96124 (diff)
downloadglibc-2bbd06bcee5fe62896d71f78c6c2b6d0f3a23467.tar.gz
glibc-2bbd06bcee5fe62896d71f78c6c2b6d0f3a23467.tar.xz
glibc-2bbd06bcee5fe62896d71f78c6c2b6d0f3a23467.zip
Replace conform/list-header-symbols.pl with a Python script.
Continuing the move of test code from Perl to Python (which seems
uncontroversial, unlike dependencies on Python in the actual build of
glibc), this patch replaces conform/list-header-symbols.pl with a
Python script, as a first step in converting the conform/ tests.
(conform/glibcconform.py is an equivalent to GlibcConform.pm,
containing code that will be relevant to move than one of the conform/
scripts.)

Tested for x86_64, including verifying that the symbol lists generated
are identical to those generated by the Perl version.

	* conform/glibcconform.py: New file.
	* conform/list-header-symbols.py: Likewise.
	* conform/list-header-symbols.pl: Remove.
	* conform/Makefile (tests-special): Only add linknamespace tests
	if [PYTHON].
	($(linknamespace-symlists-tests)): Use list-header-symbols.py.
Diffstat (limited to 'conform/Makefile')
-rw-r--r--conform/Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/conform/Makefile b/conform/Makefile
index d43093171b..71e58a46c8 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -120,7 +120,9 @@ linknamespace-symlists-base := $(foreach std,$(conformtest-standards),\
 					     symlist-$(std))
 linknamespace-symlists-tests := $(addprefix $(objpfx),\
 					    $(linknamespace-symlists-base))
+ifdef PYTHON
 tests-special += $(linknamespace-symlists-tests)
+endif
 
 linknamespace-symlist-stdlibs-base := $(foreach std,$(conformtest-standards),\
 						    symlist-stdlibs-$(std))
@@ -128,7 +130,9 @@ linknamespace-symlist-stdlibs-tests := \
 	$(addprefix $(objpfx),\
 		    $(linknamespace-symlist-stdlibs-base))
 
+ifdef PYTHON
 tests-special += $(linknamespace-symlist-stdlibs-tests)
+endif
 
 linknamespace-header-base := $(foreach std,\
 				       $(conformtest-standards),\
@@ -137,7 +141,9 @@ linknamespace-header-base := $(foreach std,\
 						 $(std)/$(h)/linknamespace.out))
 linknamespace-header-tests := $(addprefix $(objpfx),\
 					  $(linknamespace-header-base))
+ifdef PYTHON
 tests-special += $(linknamespace-header-tests)
+endif
 
 include ../Rules
 
@@ -181,11 +187,10 @@ $(conformtest-header-tests): $(objpfx)%/conform.out: \
 		 > $@); \
 	$(evaluate-test)
 
-$(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl
-	$(PERL) -I. -w $< --tmpdir=$(objpfx) --cc='$(CC)' \
-		--flags='$(conformtest-cc-flags)' --standard=$* \
-		--headers="$(strip $(conformtest-headers-$*))" \
-		> $@ 2> $@.err; \
+$(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.py
+	$(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \
+		  --standard=$* --headers="$(strip $(conformtest-headers-$*))" \
+		  > $@ 2> $@.err; \
 	$(evaluate-test)
 
 linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a