@@ -28,20 +28,26 @@ class TestBuildAction(TestCase):
28
28
def test_linux_release_build_cargo_command (self ):
29
29
cargo = BinaryPath (None , None , None , binary_path = "path/to/cargo" )
30
30
action = BuildAction ("source_dir" , "foo" , {"cargo" : cargo }, "linux" , BuildMode .RELEASE )
31
- self .assertEqual (action .build_command ("foo" ), ["path/to/cargo" , "build" , "-p" , "foo" , "--release" ])
31
+ self .assertEqual (
32
+ action .build_command ("foo" ),
33
+ ["path/to/cargo" , "build" , "-p" , "foo" , "--target" , "x86_64-unknown-linux-musl" , "--release" ],
34
+ )
32
35
33
36
def test_nonlinux_release_build_cargo_command (self ):
34
37
cargo = BinaryPath (None , None , None , binary_path = "path/to/cargo" )
35
38
action = BuildAction ("source_dir" , "foo" , {"cargo" : cargo }, "darwin" , BuildMode .RELEASE )
36
39
self .assertEqual (
37
40
action .build_command ("foo" ),
38
- ["path/to/cargo" , "build" , "-p" , "foo" , "--release" , "-- target" , "x86_64-unknown-linux-musl" ],
41
+ ["path/to/cargo" , "build" , "-p" , "foo" , "--target" , "x86_64-unknown-linux-musl" , "--release " ],
39
42
)
40
43
41
44
def test_linux_debug_build_cargo_command (self ):
42
45
cargo = BinaryPath (None , None , None , binary_path = "path/to/cargo" )
43
46
action = BuildAction ("source_dir" , "foo" , {"cargo" : cargo }, "linux" , BuildMode .DEBUG )
44
- self .assertEqual (action .build_command ("foo" ), ["path/to/cargo" , "build" , "-p" , "foo" ])
47
+ self .assertEqual (
48
+ action .build_command ("foo" ),
49
+ ["path/to/cargo" , "build" , "-p" , "foo" , "--target" , "x86_64-unknown-linux-musl" ],
50
+ )
45
51
46
52
def test_nonlinux_debug_build_cargo_command (self ):
47
53
cargo = BinaryPath (None , None , None , binary_path = "path/to/cargo" )
0 commit comments