Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit c90d118

Browse files
authored
Merge pull request #73 from paritytech/bernhard-papercuts
papercuts
2 parents bdffcad + 1287e59 commit c90d118

File tree

5 files changed

+82
-18
lines changed

5 files changed

+82
-18
lines changed

Cargo.lock

+74-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ chrono = "0.4"
106106
itertools = "0.10"
107107
predicates = "1"
108108
selenium-rs = "0.1"
109+
serial_test = "0.5"
109110

110111
[target.'cfg(unix)'.dependencies]
111112
daemonize = "0.4"

tests/dist.rs

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use sccache::dist::{
1515
AssignJobResult, CompileCommand, InputsReader, JobId, JobState, RunJobResult, ServerIncoming,
1616
ServerOutgoing, SubmitToolchainResult, Toolchain, ToolchainReader,
1717
};
18+
use serial_test::serial;
1819
use std::ffi::OsStr;
1920
use std::path::Path;
2021

@@ -55,6 +56,7 @@ pub fn dist_test_sccache_client_cfg(
5556

5657
#[test]
5758
#[cfg_attr(not(feature = "dist-tests"), ignore)]
59+
#[serial]
5860
fn test_dist_basic() {
5961
let tmpdir = tempfile::Builder::new()
6062
.prefix("sccache_dist_test")
@@ -88,6 +90,7 @@ fn test_dist_basic() {
8890

8991
#[test]
9092
#[cfg_attr(not(feature = "dist-tests"), ignore)]
93+
#[serial]
9194
fn test_dist_restartedserver() {
9295
let tmpdir = tempfile::Builder::new()
9396
.prefix("sccache_dist_test")
@@ -124,6 +127,7 @@ fn test_dist_restartedserver() {
124127

125128
#[test]
126129
#[cfg_attr(not(feature = "dist-tests"), ignore)]
130+
#[serial]
127131
fn test_dist_nobuilder() {
128132
let tmpdir = tempfile::Builder::new()
129133
.prefix("sccache_dist_test")
@@ -189,6 +193,7 @@ impl ServerIncoming for FailingServer {
189193

190194
#[test]
191195
#[cfg_attr(not(feature = "dist-tests"), ignore)]
196+
#[serial]
192197
fn test_dist_failingserver() {
193198
let tmpdir = tempfile::Builder::new()
194199
.prefix("sccache_dist_test")

tests/harness/mod.rs

-10
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ use predicates::prelude::*;
2525
use serde::Serialize;
2626
use uuid::Uuid;
2727

28-
#[cfg(feature = "dist-server")]
29-
macro_rules! matches {
30-
($expression:expr, $($pattern:tt)+) => {
31-
match $expression {
32-
$($pattern)+ => true,
33-
_ => false
34-
}
35-
}
36-
}
37-
3828
const CONTAINER_NAME_PREFIX: &str = "sccache_dist_test";
3929
const DIST_IMAGE: &str = "sccache_dist_test_image";
4030
const DIST_DOCKERFILE: &str = include_str!("Dockerfile.sccache-dist");

tests/oauth.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![cfg(all(feature = "dist-client"))]
33

44
use selenium_rs::webdriver::{Browser, Selector, WebDriver};
5+
use serial_test::serial;
56
use std::fs;
67
use std::io::{self, Read, Write};
78
use std::net::TcpStream;
@@ -189,6 +190,7 @@ impl Drop for SeleniumContainer {
189190
not(all(target_os = "linux", target_arch = "x86_64", feature = "dist-tests")),
190191
ignore
191192
)]
193+
#[serial]
192194
fn test_auth() {
193195
// Make sure the client auth port isn't in use, as sccache will gracefully fall back
194196
let client_auth_port = sccache::dist::client_auth::VALID_PORTS[0];

0 commit comments

Comments
 (0)