mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 09:31:00 +00:00
tests: Fix garage integration test
This commit is contained in:
parent
dd407e7041
commit
3baa841d6f
4 changed files with 6 additions and 9 deletions
|
@ -46,7 +46,7 @@ steps:
|
||||||
- name: nix_config
|
- name: nix_config
|
||||||
path: /etc/nix
|
path: /etc/nix
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --option log-lines 100 --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
|
||||||
|
|
||||||
- name: unit tests
|
- name: unit tests
|
||||||
image: nixpkgs/nix:nixos-21.05
|
image: nixpkgs/nix:nixos-21.05
|
||||||
|
@ -59,6 +59,7 @@ steps:
|
||||||
- |
|
- |
|
||||||
nix-build \
|
nix-build \
|
||||||
--no-build-output \
|
--no-build-output \
|
||||||
|
--option log-lines 100 \
|
||||||
--argstr target x86_64-unknown-linux-musl \
|
--argstr target x86_64-unknown-linux-musl \
|
||||||
--argstr compileMode test
|
--argstr compileMode test
|
||||||
- ./result*/bin/garage_api*
|
- ./result*/bin/garage_api*
|
||||||
|
|
|
@ -76,7 +76,7 @@ in let
|
||||||
*/
|
*/
|
||||||
''^(src|tests)'' # fixed default
|
''^(src|tests)'' # fixed default
|
||||||
''.*\.(rs|toml)$'' # fixed default
|
''.*\.(rs|toml)$'' # fixed default
|
||||||
''^(crdt|replication|cli|helper|signature)'' # our crate submodules
|
''^(crdt|replication|cli|helper|signature|common|ext)'' # our crate submodules
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ description = "Garage, an S3-compatible distributed object store for self-hosted
|
||||||
repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage"
|
repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage"
|
||||||
readme = "../../README.md"
|
readme = "../../README.md"
|
||||||
|
|
||||||
|
autotests = false
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "garage"
|
name = "garage"
|
||||||
path = "main.rs"
|
path = "main.rs"
|
||||||
|
|
|
@ -179,12 +179,6 @@ index = "index.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for Instance {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
self.terminate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static mut INSTANCE: MaybeUninit<Instance> = MaybeUninit::uninit();
|
static mut INSTANCE: MaybeUninit<Instance> = MaybeUninit::uninit();
|
||||||
static INSTANCE_INIT: Once = Once::new();
|
static INSTANCE_INIT: Once = Once::new();
|
||||||
|
|
||||||
|
@ -192,7 +186,7 @@ static INSTANCE_INIT: Once = Once::new();
|
||||||
extern "C" fn terminate_instance() {
|
extern "C" fn terminate_instance() {
|
||||||
if INSTANCE_INIT.is_completed() {
|
if INSTANCE_INIT.is_completed() {
|
||||||
unsafe {
|
unsafe {
|
||||||
INSTANCE.assume_init_drop();
|
INSTANCE.assume_init_mut().terminate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue