Skip to content

Commit e7c1098

Browse files
committed
Build shared library only once for cpp_library_spec.rb.
1 parent 0cbb275 commit e7c1098

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: spec/cpp_library_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,12 @@ def verified_install(backend, path)
271271
end
272272

273273
test_files = Pathname.glob(Pathname.new(cpp_lib_path) + "test" + "*.cpp")
274-
test_files.each do |path|
275-
expected = path.basename.to_s.include?("good")
276-
config.compilers_to_use.each do |compiler|
274+
config.compilers_to_use.each do |compiler|
275+
exe = @cpp_library.build_shared_library([], compiler, config.gcc_config("uno"))
276+
expect(exe).not_to be nil
277+
test_files.each do |path|
278+
expected = path.basename.to_s.include?("good")
277279
it "tests #{File.basename(path)} with #{compiler} expecting #{expected}" do
278-
exe = @cpp_library.build_shared_library([], compiler, config.gcc_config("uno"))
279-
expect(exe).not_to be nil
280280
exe = @cpp_library.build_for_test(path, compiler)
281281
expect(exe).not_to be nil
282282
expect(@cpp_library.run_test_file(exe)).to eq(expected)

0 commit comments

Comments
 (0)