about summary refs log tree commit diff
path: root/third_party/bazel/rules_nixpkgs/tests
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_nixpkgs/tests')
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/BUILD58
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/cc-test.cc1
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/hello.nix3
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/nixpkgs.nix1
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/output.nix13
-rw-r--r--third_party/bazel/rules_nixpkgs/tests/pkgname.nix1
-rwxr-xr-xthird_party/bazel/rules_nixpkgs/tests/test_bin.sh4
-rwxr-xr-xthird_party/bazel/rules_nixpkgs/tests/test_output.sh15
8 files changed, 0 insertions, 96 deletions
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 <nixpkgs> {}; 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 <nixpkgs> {}
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 <nixpkgs> {};
-
-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