Commit ba1a3c6f authored by Gian Saß's avatar Gian Saß

Recursively search for SourceCodeTest files

parent 0bbb1385
......@@ -17,22 +17,16 @@ module JavaSubmissionTester
run_unzipped test_file do |path|
pathname = Pathname.new path
src_package = nil
Dir.entries(pathname).each do |e|
if e != 'de' && e != 'META-INF'
src_package = e
end
end
only_source_code_test = false
if !src_package.nil?
# Ignore StaticCodeTests
Dir[pathname + '/' + src_package + '/StaticCodeTests.*'].each do |f|
File.delete(f)
end
Dir[pathname + '**/SourceCodeTest.*'].each do |f|
byebug
# If the hidden test only included the source code test files, then
# dont check if it compiles at all
only_source_code_test = Dir[pathname + '/' + src_package].empty?
File.delete(f)
if Dir.empty?(File.dirname(f))
only_source_code_test = true
end
end
validation_message = 'Test muss die Java Source Dateien enthalten!' if Dir[pathname + '**/*.java'].empty?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment