aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/component/deb/test_import_orig.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/component/deb/test_import_orig.py b/tests/component/deb/test_import_orig.py
index b95b874d..ef75919e 100644
--- a/tests/component/deb/test_import_orig.py
+++ b/tests/component/deb/test_import_orig.py
@@ -401,3 +401,18 @@ class TestImportOrig(ComponentTestBase):
("GBP_TAG", "upstream/2.8"),
("GBP_UPSTREAM_VERSION", "2.8"),
("GBP_DEBIAN_VERSION", "2.8-1")])
+
+ def test_postunpack_env_vars(self):
+ """
+ Test that the expected environment variables are set during
+ postunpack hook.
+ """
+ repo = ComponentTestGitRepository.create(self.pkg)
+ os.chdir(self.pkg)
+ orig = self._orig('2.8')
+ ok_(import_orig(['arg0',
+ '--postunpack=printenv > ../postunpack.out',
+ '--no-interactive', '--pristine-tar', orig]) == 0)
+ self.check_hook_vars('../postunpack', ["GBP_GIT_DIR",
+ "GBP_TMP_DIR",
+ "GBP_SOURCES_DIR"])