Support arbitrary relative paths for setupfiles in run_docker_compare script.
This commit is contained in:
		
							parent
							
								
									1a704dd312
								
							
						
					
					
						commit
						3031b6edd4
					
				| @ -37,7 +37,8 @@ function launch_container { | ||||
|     fi | ||||
| 
 | ||||
|     if [ "$SHELL" != "YES" ]; then | ||||
|         local features_joined=$(IFS=","; echo "${features[*]}") | ||||
|         local features_joined | ||||
|         features_joined=$(IFS=","; echo "${features[*]}") | ||||
|         additional_args+=(cargo run --bin compare --no-default-features --features "$features_joined") | ||||
|         additional_flags+=(--read-only) | ||||
|     else | ||||
| @ -52,10 +53,9 @@ function launch_container { | ||||
|     if [ $# -gt 0 ]; then | ||||
|         # If we passed in args, we need to forward them along | ||||
|         for path in "${@}"; do | ||||
|             local full_path=$($REALPATH "$path") | ||||
|             local containing_folder=$(dirname "$full_path") | ||||
|             local file_name=$(basename "$full_path") | ||||
|             docker run "${additional_flags[@]}" --init --rm -i --mount type=tmpfs,destination=/tmp -v "${containing_folder}:/input:ro"  -v "$($REALPATH "$DIR/../"):/source:ro" --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source --entrypoint "" organic-test "${additional_args[@]}" -- "/input/$file_name" | ||||
|             local full_path | ||||
|             full_path=$($REALPATH "$path") | ||||
|             docker run "${additional_flags[@]}" --init --rm -i --mount type=tmpfs,destination=/tmp -v "/:/input:ro"  -v "$($REALPATH "$DIR/../"):/source:ro" --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source --entrypoint "" organic-test "${additional_args[@]}" -- "/input${full_path}" | ||||
|         done | ||||
|     else | ||||
|         docker run "${additional_flags[@]}" --init --rm -i --mount type=tmpfs,destination=/tmp -v "$($REALPATH "$DIR/../"):/source:ro" --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source --entrypoint "" organic-test "${additional_args[@]}" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander