mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-28 00:48:50 +00:00 
			
		
		
		
	Updated ant rules to finish with a failure when a run test is not successful; and enforced failure of DownloadTest, to validate
This commit is contained in:
		
							parent
							
								
									35f5ae5147
								
							
						
					
					
						commit
						b7dc13e180
					
				| @ -6,7 +6,7 @@ before_install: | ||||
| - curl -3L https://raw.github.com/embarkmobile/android-sdk-installer/version-1/android-sdk-installer | ||||
|   | bash /dev/stdin --install=$COMPONENTS | ||||
| - source ~/.android-sdk-installer/env | ||||
| - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M | ||||
| - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI | ||||
| - emulator -avd test -no-skin -no-audio -no-window & | ||||
| - rm pom.xml | ||||
| - android update project -p . | ||||
| @ -17,7 +17,7 @@ script: | ||||
| - ant clean | ||||
| - ant debug | ||||
| - cd test_client/tests | ||||
| - ant clean debug install test | ||||
| - ant acceptance-test | ||||
| env: | ||||
|   global: | ||||
|   - secure: f4Kms/mzkYRG4Kp8k6hsvG3Y0ztbJnA2J79OBw3VdqJOKVTzwsxMd1Yh325YDYO7I4HeHxGXy0H4p3rAPzIWr/nrOJ4wmcDwQYDQtVjF7S1ARWsX51FrCEV6A9ec2LAqNCQ8ZC0SoGb+HsmpFCE3uKAxRQt+B5MzOZvKNcvYpMA= | ||||
|  | ||||
							
								
								
									
										19
									
								
								test_client/tests/custom_rules.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								test_client/tests/custom_rules.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project name="custom_rules"> | ||||
| 	<!-- Run regular Android target 'test', but fails if any test is not successful --> | ||||
| 	<target name="acceptance-test" depends="clean, debug, install" > | ||||
| 		<property name="log.file" value="tests_output.txt" /> | ||||
| 		<record name="${log.file}" action="start" /> | ||||
| 		<antcall target="test" />	<!-- regular Android target -->  | ||||
| 		<record name="${log.file}" action="stop" /> | ||||
| 		<loadfile property="tests.output" srcFile="${log.file}" /> | ||||
| 		<echo>Checking for failures</echo> | ||||
| 		<fail message="Acceptance tests failed." > | ||||
| 			<condition> | ||||
| 				<contains string="${tests.output}" substring="FAILURES" /> | ||||
| 			</condition> | ||||
| 		</fail> | ||||
| 		<echo>All tests passed.</echo> | ||||
| 	</target> | ||||
| 	 | ||||
| </project> | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user