From 128875b501bc2989617ae553317b80faa556d752 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 15 Aug 2019 16:11:30 +0100 Subject: chore: Remove remaining Bazel-related files --- third_party/bazel/rules_nixpkgs/tests/BUILD | 58 ---------------------- third_party/bazel/rules_nixpkgs/tests/cc-test.cc | 1 - third_party/bazel/rules_nixpkgs/tests/hello.nix | 3 -- third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix | 1 - third_party/bazel/rules_nixpkgs/tests/output.nix | 13 ----- third_party/bazel/rules_nixpkgs/tests/pkgname.nix | 1 - third_party/bazel/rules_nixpkgs/tests/test_bin.sh | 4 -- .../bazel/rules_nixpkgs/tests/test_output.sh | 15 ------ 8 files changed, 96 deletions(-) delete mode 100644 third_party/bazel/rules_nixpkgs/tests/BUILD delete mode 100644 third_party/bazel/rules_nixpkgs/tests/cc-test.cc delete mode 100644 third_party/bazel/rules_nixpkgs/tests/hello.nix delete mode 100644 third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix delete mode 100644 third_party/bazel/rules_nixpkgs/tests/output.nix delete mode 100644 third_party/bazel/rules_nixpkgs/tests/pkgname.nix delete mode 100755 third_party/bazel/rules_nixpkgs/tests/test_bin.sh delete mode 100755 third_party/bazel/rules_nixpkgs/tests/test_output.sh (limited to 'third_party/bazel/rules_nixpkgs/tests') diff --git a/third_party/bazel/rules_nixpkgs/tests/BUILD b/third_party/bazel/rules_nixpkgs/tests/BUILD deleted file mode 100644 index 68e4f4c58079..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -package(default_testonly = 1) - -[ - # All of these tests use the "hello" binary to see - # whether different invocations of `nixpkgs_package` - # produce a valid bazel repository. - sh_test( - name = "run-{0}".format(test), - timeout = "short", - srcs = ["test_bin.sh"], - args = ["$(location @{0}//:bin)".format(test)], - data = ["@{0}//:bin".format(test)], - ) - for test in [ - "hello", - "expr-test", - "attribute-test", - "expr-attribute-test", - "nix-file-test", - "nix-file-deps-test", - "nixpkgs-git-repository-test", - ] -] + [ - # These tests use the nix package generated by ./output.nix - - # Checks whether the `:include` filegroup of `nixpkgs_package` - # repositories works as intended - # (that the expected number of files are inside the target) - sh_test( - name = "run-test-include", - timeout = "short", - srcs = ["test_output.sh"], - args = [ - "2", - "$(locations @output-filegroup-test//:include)", - ], - data = ["@output-filegroup-test//:include"], - ), - - # Checks whether specifying a manual filegroup in the - # `nixpkgs_package` BUILD file works as well. - sh_test( - name = "run-test-manual-filegroup", - timeout = "short", - srcs = ["test_output.sh"], - args = [ - "3", - "$(locations @output-filegroup-manual-test//:manual-filegroup)", - ], - data = ["@output-filegroup-manual-test//:manual-filegroup"], - ), -] - -# Test nixpkgs_cc_configure() by building some CC code. -cc_binary( - name = "cc-test", - srcs = ["cc-test.cc"], -) diff --git a/third_party/bazel/rules_nixpkgs/tests/cc-test.cc b/third_party/bazel/rules_nixpkgs/tests/cc-test.cc deleted file mode 100644 index 76e8197013aa..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/cc-test.cc +++ /dev/null @@ -1 +0,0 @@ -int main() { return 0; } diff --git a/third_party/bazel/rules_nixpkgs/tests/hello.nix b/third_party/bazel/rules_nixpkgs/tests/hello.nix deleted file mode 100644 index 285e93f7e803..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/hello.nix +++ /dev/null @@ -1,3 +0,0 @@ -with import ./pkgname.nix; -let pkgs = import {}; in builtins.getAttr pkgname pkgs - diff --git a/third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix b/third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix deleted file mode 100644 index cdd1f58f0ea5..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix +++ /dev/null @@ -1 +0,0 @@ -import {} diff --git a/third_party/bazel/rules_nixpkgs/tests/output.nix b/third_party/bazel/rules_nixpkgs/tests/output.nix deleted file mode 100644 index a0269adb6679..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/output.nix +++ /dev/null @@ -1,13 +0,0 @@ -with import {}; - -runCommand "some-output" { - preferLocalBuild = true; - allowSubstitutes = false; -} '' - mkdir -p $out/{bin,include/mylib} - touch $out/hi-i-exist - touch $out/hi-i-exist-too - touch $out/bin/im-a-binary - touch $out/include/mylib/im-a-header.h - touch $out/include/mylib/im-also-a-header.h -'' diff --git a/third_party/bazel/rules_nixpkgs/tests/pkgname.nix b/third_party/bazel/rules_nixpkgs/tests/pkgname.nix deleted file mode 100644 index 9a4e13899786..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/pkgname.nix +++ /dev/null @@ -1 +0,0 @@ -{ pkgname = "hello"; } diff --git a/third_party/bazel/rules_nixpkgs/tests/test_bin.sh b/third_party/bazel/rules_nixpkgs/tests/test_bin.sh deleted file mode 100755 index f4df0931b987..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/test_bin.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "Executing: " $@ -$@ diff --git a/third_party/bazel/rules_nixpkgs/tests/test_output.sh b/third_party/bazel/rules_nixpkgs/tests/test_output.sh deleted file mode 100755 index 29f2735cf4ca..000000000000 --- a/third_party/bazel/rules_nixpkgs/tests/test_output.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# first param is the expected number of files given by `locations` -expected_length="$1" - -# rest of the arguments are files -shift -no_of_files=$# - -if [ "$no_of_files" -ne "$expected_length" ]; then - echo "Should have received $expected_length files, but got $no_of_files:" - for f in "$@"; do - echo "$f" - done - exit 1 -fi -- cgit 1.4.1