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 |     fi | ||||||
| 
 | 
 | ||||||
|     if [ "$SHELL" != "YES" ]; then |     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_args+=(cargo run --bin compare --no-default-features --features "$features_joined") | ||||||
|         additional_flags+=(--read-only) |         additional_flags+=(--read-only) | ||||||
|     else |     else | ||||||
| @ -52,10 +53,9 @@ function launch_container { | |||||||
|     if [ $# -gt 0 ]; then |     if [ $# -gt 0 ]; then | ||||||
|         # If we passed in args, we need to forward them along |         # If we passed in args, we need to forward them along | ||||||
|         for path in "${@}"; do |         for path in "${@}"; do | ||||||
|             local full_path=$($REALPATH "$path") |             local full_path | ||||||
|             local containing_folder=$(dirname "$full_path") |             full_path=$($REALPATH "$path") | ||||||
|             local file_name=$(basename "$full_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}" | ||||||
|             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" |  | ||||||
|         done |         done | ||||||
|     else |     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[@]}" |         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