-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert pkg_deb tests from shell to python (#211)
* Replace build_deb_test.sh with pkg_deb_test.py * enable deb test on macos and windows * remove third_party bashunit * test needs hack on windows for #213 and #214
- Loading branch information
Showing
7 changed files
with
240 additions
and
1,075 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
licenses(["notice"]) | ||
|
||
load("//:pkg.bzl", "pkg_deb", "pkg_tar", "pkg_zip") | ||
|
@@ -176,12 +177,6 @@ py_test( | |
], | ||
) | ||
|
||
genrule( | ||
name = "test-deb-preinst", | ||
outs = ["test-deb.preinst"], | ||
cmd = "echo -n \"#!/usr/bin/env bash\n# tete ®, Й, ק ,م, ๗, あ, 叶, 葉, 말, ü and é\necho fnord\" > \"$@\"", | ||
) | ||
|
||
pkg_deb( | ||
name = "test-deb", | ||
breaks = ["oldbrokenpkg"], | ||
|
@@ -201,7 +196,7 @@ pkg_deb( | |
maintainer = "somé[email protected]", | ||
make_deb = "//:make_deb", | ||
package = "titi", | ||
preinst = ":test-deb-preinst", | ||
preinst = "testdata/deb_preinst", | ||
replaces = ["oldpkg"], | ||
templates = ":testdata/templates", | ||
urgency = "low", | ||
|
@@ -236,7 +231,7 @@ pkg_deb( | |
maintainer = "somé[email protected]", | ||
make_deb = "//:make_deb_py2", | ||
package = "titi", | ||
preinst = ":test-deb-preinst", | ||
preinst = "testdata/deb_preinst", | ||
replaces = ["oldpkg"], | ||
templates = ":testdata/templates", | ||
urgency = "low", | ||
|
@@ -370,25 +365,20 @@ py_test( | |
python_version = "PY3", | ||
) | ||
|
||
sh_test( | ||
name = "build_test_deb", | ||
py_test( | ||
name = "pkg_deb_test", | ||
size = "medium", | ||
srcs = [ | ||
"build_test_deb.sh", | ||
"pkg_deb_test.py", | ||
], | ||
python_version = "PY3", | ||
data = [ | ||
"testenv.sh", | ||
":test-deb.deb", | ||
":test-deb-py2.deb", | ||
":titi_test_all.deb", | ||
":titi_test_all.changes", | ||
], | ||
tags = [ | ||
# dpkg tools are only available on debian | ||
"no_macos", | ||
"no_windows", | ||
], | ||
deps = [ | ||
"@rules_pkg//third_party/bazel/src/test/shell:bashunit", | ||
"//:archive", | ||
"@bazel_tools//tools/python/runfiles", | ||
], | ||
) | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.