Author: toulmean
Date: Fri Jul 23 18:17:26 2010
New Revision: 967186
URL: http://svn.apache.org/viewvc?rev=967186&view=rev
Log:
adding integration tests, just a beginning, need a before and after cleanup
Added:
buildr/trunk/tests/
buildr/trunk/tests/BUILDR-320/
buildr/trunk/tests/BUILDR-320/Buildfile
buildr/trunk/tests/JavaSystemProperty/
buildr/trunk/tests/JavaSystemProperty/Buildfile
buildr/trunk/tests/JavaSystemProperty/src/
buildr/trunk/tests/JavaSystemProperty/src/test/
buildr/trunk/tests/JavaSystemProperty/src/test/java/
buildr/trunk/tests/JavaSystemProperty/src/test/java/FooTest.java
buildr/trunk/tests/helloWorld/
buildr/trunk/tests/helloWorld/Buildfile
buildr/trunk/tests/helloWorld/src/
buildr/trunk/tests/helloWorld/src/main/
buildr/trunk/tests/helloWorld/src/main/java/
buildr/trunk/tests/helloWorld/src/main/java/HelloWorld.java
buildr/trunk/tests/integration_testing.rb
Added: buildr/trunk/tests/BUILDR-320/Buildfile
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/BUILDR-320/Buildfile?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/BUILDR-320/Buildfile (added)
+++ buildr/trunk/tests/BUILDR-320/Buildfile Fri Jul 23 18:17:26 2010
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+define "whole" do
+ define 'sub' do
+ define 'C' do
+ compile.with project('sub:B')
+ end
+
+ define 'A' do
+ end
+
+ define 'B' do
+ compile.with project('sub:A')
+ end
+ end
+end
\ No newline at end of file
Added: buildr/trunk/tests/JavaSystemProperty/Buildfile
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/JavaSystemProperty/Buildfile?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/JavaSystemProperty/Buildfile (added)
+++ buildr/trunk/tests/JavaSystemProperty/Buildfile Fri Jul 23 18:17:26 2010
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+define "proj" do
+ Java.java.lang.System.setProperty("foo", "bar")
+end
\ No newline at end of file
Added: buildr/trunk/tests/JavaSystemProperty/src/test/java/FooTest.java
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/JavaSystemProperty/src/test/java/FooTest.java?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/JavaSystemProperty/src/test/java/FooTest.java (added)
+++ buildr/trunk/tests/JavaSystemProperty/src/test/java/FooTest.java Fri Jul 23
18:17:26 2010
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+
+import org.junit.Test;
+
+public class FooTest {
+
+ @Test
+ public void testSomething() {}
+}
\ No newline at end of file
Added: buildr/trunk/tests/helloWorld/Buildfile
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/helloWorld/Buildfile?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/helloWorld/Buildfile (added)
+++ buildr/trunk/tests/helloWorld/Buildfile Fri Jul 23 18:17:26 2010
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+define "helloWorld", :version => "1.0", :group => "org.buildr" do
+
+ package(:jar)
+
+end
\ No newline at end of file
Added: buildr/trunk/tests/helloWorld/src/main/java/HelloWorld.java
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/helloWorld/src/main/java/HelloWorld.java?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/helloWorld/src/main/java/HelloWorld.java (added)
+++ buildr/trunk/tests/helloWorld/src/main/java/HelloWorld.java Fri Jul 23
18:17:26 2010
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+
+public class HelloWorld {
+
+ public void foo() {
+ System.err.println("bar");
+ }
+}
\ No newline at end of file
Added: buildr/trunk/tests/integration_testing.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/tests/integration_testing.rb?rev=967186&view=auto
==============================================================================
--- buildr/trunk/tests/integration_testing.rb (added)
+++ buildr/trunk/tests/integration_testing.rb Fri Jul 23 18:17:26 2010
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+BUILDR = ENV['BUILDR'] || File.join(File.expand_path(File.dirname(__FILE__)),
"..", "bin", "buildr")
+
+require 'test/unit'
+
+def test(folder, cmd)
+ eval <<-TEST
+class #{folder.sub("-", "").capitalize} < Test::Unit::TestCase
+
+ def test_#{folder.sub("-", "")}
+ result = %x[cd #{File.join(File.expand_path(File.dirname(__FILE__)),
"#{folder}")} ; #{cmd}]
+ assert($?.success?)
+ end
+
+end
+TEST
+
+end
+
+class Buildr320 < Test::Unit::TestCase
+
+ def test_circular_dependency
+ result = %x[cd #{File.join(File.expand_path(File.dirname(__FILE__)),
"BUILDR-320")} ; #{BUILDR} --trace -P]
+ assert($?.success?)
+ end
+
+end
+
+test("JavaSystemProperty", "#{BUILDR} test")
+test("helloWorld", "#{BUILDR} package")
\ No newline at end of file