Skip to content

Commit

Permalink
Merge pull request #374 from wileykestner/master
Browse files Browse the repository at this point in the history
Expose failing test in CI and then fix the failing test
  • Loading branch information
tjarratt committed Feb 1, 2016
2 parents b5d74a6 + 865f7fc commit 3d0d8e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cedar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4994,6 +4994,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
HEADER_SEARCH_PATHS = (
Expand Down
6 changes: 4 additions & 2 deletions scripts/rake/helpers/simulator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ def self.launch(app_dir, app_name, logfile)
Shell.with_env({"CEDAR_REPORTER_CLASS" => "CDRColorizedReporter"}) do
begin
kill # ensure simulator is not currently running
Shell.run "ios-sim launch #{File.join(app_dir, "#{app_name}.app").inspect} --devicetypeid \"com.apple.CoreSimulator.SimDeviceType.iPhone-5s, #{SDK_RUNTIME_VERSION}\" --verbose --stdout build/uispecs.spec.log"
Shell.run "grep -q ', 0 failures' build/uispecs.spec.log", logfile
Shell.run "rm -rf #{logfile}"
Shell.run "ios-sim launch #{File.join(app_dir, "#{app_name}.app").inspect} --devicetypeid \"com.apple.CoreSimulator.SimDeviceType.iPhone-5s, #{SDK_RUNTIME_VERSION}\" --verbose --stdout #{logfile}"
Shell.run "grep -q ', 0 failures' #{logfile}" # Fail unless we find the literal string '0 failures', this is to prevent the tests going green if the test runner itself crashes before it logs ANY output
Shell.run "! grep -q ', [1-9][0-9]* failures' #{logfile}" # Fail if we find any number of failures
rescue
retry_count += 1

Expand Down
6 changes: 3 additions & 3 deletions scripts/rake/tasks/spec_suites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}

Shell.with_env(env_vars) do
Simulator.launch(Xcode.build_dir("-iphonesimulator"), UI_SPECS_TARGET_NAME, "uispecs.run.log")
Simulator.launch(Xcode.build_dir("-iphonesimulator"), UI_SPECS_TARGET_NAME, Xcode.build_dir("-uispecs.run.log"))
end
end
end
Expand Down Expand Up @@ -107,7 +107,7 @@
}

Shell.with_env(env_vars) do
Simulator.launch(Xcode.build_dir("-iphonesimulator"), IOS_STATIC_FRAMEWORK_SPECS_TARGET_NAME, "frameworks.ios.static.specs.run.log")
Simulator.launch(Xcode.build_dir("-iphonesimulator"), IOS_STATIC_FRAMEWORK_SPECS_TARGET_NAME, Xcode.build_dir("-frameworks.ios.static.specs.run.log"))
end
end
end
Expand All @@ -134,7 +134,7 @@
}

Shell.with_env(env_vars) do
Simulator.launch(Xcode.build_dir("-iphonesimulator"), IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME, "frameworks.ios.dynamic.specs.run.log")
Simulator.launch(Xcode.build_dir("-iphonesimulator"), IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME, Xcode.build_dir("-frameworks.ios.dynamic.specs.run.log"))
end
end
end
Expand Down

0 comments on commit 3d0d8e3

Please sign in to comment.