Skip to content

Commit

Permalink
Merge pull request #634 from NixOS/update-test-data
Browse files Browse the repository at this point in the history
distribution-nixpkgs/test: update nixpkgs platform test data
  • Loading branch information
sternenseemann authored Dec 1, 2024
2 parents 5908d6a + b41cae4 commit 3948e42
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion distribution-nixpkgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ To check if any new platforms need to be covered, do the following:

3. If the test suite fails, add test cases for all missing system tuples.

4. In all cases, change the dates of last update in `test/hspec.hs` and
4. In all cases, change the date of last update in
`src/Distribution/Nixpkgs/Meta.hs` to the current day.
2 changes: 1 addition & 1 deletion distribution-nixpkgs/src/Distribution/Nixpkgs/Meta.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ nixpkgsPlatformFromCabal (Platform arch os) = "\"" ++ nixArch ++ "-" ++ nixOs ++
-- using 'nixpkgsPlatformFromString' and rendering them via the 'Pretty'
-- instance of 'NixpkgsPlatform' should not change the system tuple
-- for tuples accepted by nixpkgs. This has been tested for all known tuples
-- (from @lib.platforms@ and @lib.systems.examples@) as of 2022-05-08.
-- (from @lib.platforms@ and @lib.systems.examples@) as of 2024-12-01.
-- Please open an issue if any newly added ones are not recognized properly.
--
-- __Warning__: 'nixpkgsPlatformFromString' consequently tries to preserve all
Expand Down
2 changes: 1 addition & 1 deletion distribution-nixpkgs/test/data/all-system-tuples.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]
["aarch64-darwin","aarch64-freebsd","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64-windows","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]
8 changes: 6 additions & 2 deletions distribution-nixpkgs/test/hspec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@ main = hspec $ do
it "is parsed correctly" $
nixpkgsPlatformFromString str `shouldBe` Just plat

-- All system tuples from lib.platforms as of 2022-05-08. Testing these allows
-- us to get notified about behavior change in Cabal as early as possible.
-- All system tuples from lib.platforms. Testing these allows us to
-- get notified about behavior change in Cabal as early as possible.
-- You can check if the list is up to date by running
-- regenerate-all-system-tuples.sh.
nixpkgsSystemMapping :: [(String, Platform)]
nixpkgsSystemMapping =
[ -- lib.platforms.all
("aarch64-darwin", Platform AArch64 OSX)
, ("aarch64-freebsd", Platform AArch64 FreeBSD)
, ("aarch64-genode", Platform AArch64 (OtherOS "genode"))
, ("aarch64-linux", Platform AArch64 Linux)
, ("aarch64-netbsd", Platform AArch64 NetBSD)
, ("aarch64-none", Platform AArch64 (OtherOS "none"))
, ("aarch64-windows", Platform AArch64 Windows)
, ("aarch64_be-none", Platform (OtherArch "aarch64_be") (OtherOS "none"))
, ("arm-none", Platform Arm (OtherOS "none"))
, ("armv5tel-linux", Platform (OtherArch "armv5tel") Linux)
Expand Down

0 comments on commit 3948e42

Please sign in to comment.