Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3cfb0e2b3d2e
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bfac4a6a3d2f
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 26, 2019

  1. filtering

    eggrobin committed Aug 26, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8e2d151 View commit details
  2. Copy the full SHA
    05ff2f8 View commit details
  3. rebuild_release

    eggrobin committed Aug 26, 2019
    Copy the full SHA
    558e1ba View commit details
  4. Merge pull request #2310 from eggrobin/diurnal-testing

    Diurnal testing
    eggrobin authored Aug 26, 2019
    Copy the full SHA
    bfac4a6 View commit details
Showing with 47 additions and 20 deletions.
  1. +1 −1 astronomy/trappist_dynamics_test.cpp
  2. +0 −14 build_for_benchmarking.ps1
  3. +32 −5 parallel_test_runner/parallel_test_runner.cs
  4. +14 −0 rebuild_release.ps1
2 changes: 1 addition & 1 deletion astronomy/trappist_dynamics_test.cpp
Original file line number Diff line number Diff line change
@@ -1310,7 +1310,7 @@ TEST_F(TrappistDynamicsTest, PlanetBPlanetDAlignment) {
}
#endif

TEST_F(TrappistDynamicsTest, DISABLED_Optimization) {
TEST_F(TrappistDynamicsTest, DISABLED_SECULAR_Optimization) {
auto const gravity_model_message = ParseGravityModel(
SOLUTION_DIR / "astronomy" / "trappist_gravity_model.proto.txt");
auto const preoptimization_initial_state_message = ParseInitialState(
14 changes: 0 additions & 14 deletions build_for_benchmarking.ps1

This file was deleted.

37 changes: 32 additions & 5 deletions parallel_test_runner/parallel_test_runner.cs
Original file line number Diff line number Diff line change
@@ -45,7 +45,9 @@ static Task RunProcessAsync(string file_name, string args) {
static void Main(string[] args) {
Granularity? granularity_option = null;
bool? instrument_option = null;

bool? also_run_disabled_tests_option = null;
string filter_option = null;

var death_test_processes = new List<Process>();
var processes = new List<Process>();
int test_process_counter = 0;
@@ -62,17 +64,28 @@ static void Main(string[] args) {
granularity_option = ParseEnum<Granularity>(value);
} else if (option == "instrument") {
instrument_option = bool.Parse(value);
} else if (option == "also_run_disabled_tests") {
also_run_disabled_tests_option = bool.Parse(value);
} else if (option == "filter") {
filter_option = value;
} else {
Console.WriteLine("Unknown option " + option);
Environment.Exit(1);
}
continue;
}
Granularity granularity =
granularity_option.GetValueOrDefault(Granularity.Test);
bool instrument = instrument_option.GetValueOrDefault(false);
Granularity granularity = granularity_option ?? Granularity.Test;
bool instrument = instrument_option ?? false;
bool also_run_disabled_tests = also_run_disabled_tests_option ?? false;
string filter = filter_option;
granularity_option = null;
instrument_option = null;
filter_option = null;

if (filter != null && granularity == Granularity.Package) {
Console.WriteLine("--filter is not supported with --granularity:Package");
Environment.Exit(1);
}

string[] test_binaries = Directory.GetFiles(arg, "*_tests.exe");
foreach (string test_binary in test_binaries) {
@@ -100,10 +113,17 @@ static void Main(string[] args) {
process.StartInfo.Arguments +=
" --gtest_output=xml:TestResults\\gtest_results_" +
test_process_counter++ + ".xml";
if (also_run_disabled_tests) {
process.StartInfo.Arguments += " --gtest_also_run_disabled_tests";
}
death_test_processes.Add(process);
continue;
}
var info = new ProcessStartInfo(test_binary, "--gtest_list_tests");
var info = new ProcessStartInfo(
test_binary,
filter == null
? "--gtest_list_tests"
: $"--gtest_list_tests --gtest_filter={filter}");
info.UseShellExecute = false;
info.RedirectStandardOutput = true;
var list_tests = Process.Start(info);
@@ -125,6 +145,10 @@ static void Main(string[] args) {
process.StartInfo.Arguments +=
" --gtest_output=xml:TestResults\\gtest_results_" +
test_process_counter++ + ".xml";
if (also_run_disabled_tests) {
process.StartInfo.Arguments +=
" --gtest_also_run_disabled_tests";
}
if (is_death_test.Value) {
death_test_processes.Add(process);
} else {
@@ -143,6 +167,9 @@ static void Main(string[] args) {
process.StartInfo.Arguments +=
" --gtest_output=xml:TestResults\\gtest_results_" +
test_process_counter++ + ".xml";
if (also_run_disabled_tests) {
process.StartInfo.Arguments += " --gtest_also_run_disabled_tests";
}
if (is_death_test.Value) {
death_test_processes.Add(process);
} else {
14 changes: 14 additions & 0 deletions rebuild_release.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$ErrorActionPreference = "Stop"

$msbuild = &".\find_msbuild.ps1"

&$msbuild `
"/t:Clean;Build" `
/m `
/property:Configuration=Release `
/property:Platform=x64 `
Principia.sln

if (!$?) {
exit 1
}