uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,44 @@
|
|||
{ writeText, bazel, runLocal, bazelTest, distDir }:
|
||||
|
||||
# Tests that certain executables are available in bazel-executed bash shells.
|
||||
|
||||
let
|
||||
WORKSPACE = writeText "WORKSPACE" ''
|
||||
workspace(name = "our_workspace")
|
||||
'';
|
||||
|
||||
fileIn = writeText "input.txt" ''
|
||||
one
|
||||
two
|
||||
three
|
||||
'';
|
||||
|
||||
fileBUILD = writeText "BUILD" ''
|
||||
genrule(
|
||||
name = "tool_usage",
|
||||
srcs = [ ":input.txt" ],
|
||||
outs = [ "output.txt" ],
|
||||
cmd = "cat $(location :input.txt) | gzip - | gunzip - | awk '/t/' > $@",
|
||||
)
|
||||
'';
|
||||
|
||||
workspaceDir = runLocal "our_workspace" {} ''
|
||||
mkdir $out
|
||||
cp ${WORKSPACE} $out/WORKSPACE
|
||||
cp ${fileIn} $out/input.txt
|
||||
cp ${fileBUILD} $out/BUILD
|
||||
'';
|
||||
|
||||
testBazel = bazelTest {
|
||||
name = "bazel-test-bash-tools";
|
||||
bazelPkg = bazel;
|
||||
inherit workspaceDir;
|
||||
|
||||
bazelScript = ''
|
||||
${bazel}/bin/bazel build :tool_usage --distdir=${distDir}
|
||||
cp bazel-bin/output.txt $out
|
||||
echo "Testing content" && [ "$(cat $out | wc -l)" == "2" ] && echo "OK"
|
||||
'';
|
||||
};
|
||||
|
||||
in testBazel
|
||||
Loading…
Add table
Add a link
Reference in a new issue