mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Centralize variable substitution
A bunch of places need to edit files to incorporate the configured paths i.e. bindir, sbindir etc. Move this logic into a common file. Create arc_summary by copying arc_summary[23] as appropriate at build time instead of install time. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10559
This commit is contained in:
committed by
Brian Behlendorf
parent
bdb518c13a
commit
38e2e9ce83
@@ -0,0 +1,2 @@
|
||||
test-runner.py
|
||||
zts-report.py
|
||||
@@ -1,15 +1,8 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/bin
|
||||
dist_pkgdata_SCRIPTS = \
|
||||
pkgdata_SCRIPTS = \
|
||||
test-runner.py \
|
||||
zts-report.py
|
||||
#
|
||||
# These scripts are compatible with both Python 2.6 and 3.4. As such the
|
||||
# python 3 shebang can be replaced at install time when targeting a python
|
||||
# 2 system. This allows us to maintain a single version of the source.
|
||||
#
|
||||
if USING_PYTHON_2
|
||||
install-data-hook:
|
||||
$(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \
|
||||
$(DESTDIR)$(pkgdatadir)/test-runner.py \
|
||||
$(DESTDIR)$(pkgdatadir)/zts-report.py
|
||||
endif
|
||||
|
||||
SUBSTFILES += $(pkgdata_SCRIPTS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||
|
||||
#
|
||||
# This file and its contents are supplied under the terms of the
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||
|
||||
#
|
||||
# This file and its contents are supplied under the terms of the
|
||||
@@ -205,7 +205,6 @@ maybe = {
|
||||
'cli_root/zpool_import/zpool_import_missing_003_pos': ['SKIP', '6839'],
|
||||
'cli_root/zpool_trim/setup': ['SKIP', trim_reason],
|
||||
'cli_root/zpool_upgrade/zpool_upgrade_004_pos': ['FAIL', '6141'],
|
||||
'cli_user/misc/arc_summary3_001_pos': ['SKIP', python_reason],
|
||||
'delegate/setup': ['SKIP', exec_reason],
|
||||
'history/history_004_pos': ['FAIL', '7026'],
|
||||
'history/history_005_neg': ['FAIL', '6680'],
|
||||
@@ -1,3 +1,5 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/include
|
||||
dist_pkgdata_DATA = \
|
||||
blkdev.shlib \
|
||||
@@ -8,13 +10,5 @@ dist_pkgdata_DATA = \
|
||||
tunables.cfg \
|
||||
zpool_script.shlib
|
||||
|
||||
EXTRA_DIST = default.cfg.in
|
||||
|
||||
nodist_pkgdata_DATA = default.cfg
|
||||
|
||||
$(nodist_pkgdata_DATA): %: %.in
|
||||
-$(SED) -e 's,@zfsexecdir\@,$(zfsexecdir),g' \
|
||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
||||
$< >'$@'
|
||||
|
||||
CLEANFILES = default.cfg
|
||||
SUBSTFILES += $(nodist_pkgdata_DATA)
|
||||
|
||||
@@ -178,7 +178,6 @@ export ZFS_FILES='zdb
|
||||
ztest
|
||||
raidz_test
|
||||
arc_summary
|
||||
arc_summary3
|
||||
arcstat
|
||||
dbufstat
|
||||
zed
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgpyzfsdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
|
||||
pkgpyzfs_SCRIPTS = \
|
||||
pyzfs_unittest.ksh
|
||||
|
||||
EXTRA_DIST = \
|
||||
pyzfs_unittest.ksh.in
|
||||
|
||||
#
|
||||
# The pyzfs module is built either for Python 2 or Python 3. In order
|
||||
# to properly test it the unit tests must be updated to the matching version.
|
||||
#
|
||||
$(pkgpyzfs_SCRIPTS):%:%.in
|
||||
-$(SED) -e 's,@PYTHON\@,$(PYTHON),g' \
|
||||
$< >'$@'
|
||||
-chmod 775 $@
|
||||
|
||||
CLEANFILES = $(pkgpyzfs_SCRIPTS)
|
||||
SUBSTFILES += $(pkgpyzfs_SCRIPTS)
|
||||
|
||||
Reference in New Issue
Block a user