checks/check-static-exts-cross-android: init
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{ self, pkgs }:
|
||||
let
|
||||
pkgs' = pkgs.pkgsCross.aarch64-android;
|
||||
|
||||
sqlite-example-exts-static = pkgs'.callPackage ./util/sqlite-example-exts-static.nix { };
|
||||
|
||||
sqlite-with-static-exts = self.mkSqlite {
|
||||
pkgs = pkgs';
|
||||
|
||||
extensions = [
|
||||
{
|
||||
library = "${sqlite-example-exts-static}/lib/libaddext.a";
|
||||
init = "sqlite3_addext_init";
|
||||
}
|
||||
{
|
||||
library = "${sqlite-example-exts-static}/lib/libsubext.a";
|
||||
init = "sqlite3_subext_init";
|
||||
}
|
||||
{
|
||||
library = "${sqlite-example-exts-static}/lib/libmultext.a";
|
||||
init = "sqlite3_multext_init";
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs'.runCommand "test-sqlite-with-static-exts-aarch64" {
|
||||
nativeBuildInputs = [ sqlite-with-static-exts.sqlite-cli ];
|
||||
|
||||
passthru = {
|
||||
inherit sqlite-example-exts-static;
|
||||
inherit sqlite-with-static-exts;
|
||||
};
|
||||
} ''
|
||||
mkdir -p "$out"
|
||||
sqlite3 :memory: <<<"SELECT myadd(1, 2), mysub(5, 3), mymult(4, 6);" | tee "$out/test.log"
|
||||
grep -q -F "3|2|24" "$out/test.log" || (echo "Unexpected output from sqlite3 with static extensions" && exit 1)
|
||||
''
|
||||
@@ -44,6 +44,7 @@
|
||||
checks = forAllSystems (system: pkgs: {
|
||||
checkStaticExts = import ./checks/check-static-exts.nix { inherit self pkgs; };
|
||||
checkStaticExtsCross = import ./checks/check-static-exts-cross.nix { inherit self pkgs; };
|
||||
checkStaticExtsCrossAndroid = import ./checks/check-static-exts-cross-android.nix { inherit self pkgs; };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user