forked from ipetkov/crane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checks: add tests for building crates using workspace inheritance (ip…
- Loading branch information
Showing
27 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
checks/mkDummySrcTests/workspace-inheritance/expected/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
checks/mkDummySrcTests/workspace-inheritance/expected/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[workspace] | ||
members = ["print"] | ||
|
||
[workspace.package] | ||
edition = "2021" | ||
version = "0.2.0" |
9 changes: 9 additions & 0 deletions
9
checks/mkDummySrcTests/workspace-inheritance/expected/hello/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
build = "cranespecific-dummy.rs" | ||
name = "hello" | ||
|
||
[package.edition] | ||
workspace = true | ||
|
||
[package.version] | ||
workspace = true |
9 changes: 9 additions & 0 deletions
9
checks/mkDummySrcTests/workspace-inheritance/expected/hello/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![allow(dead_code)] | ||
#![cfg_attr(target_os = "none", no_std)] | ||
|
||
#[cfg_attr(target_os = "none", panic_handler)] | ||
fn panic(_info: &::core::panic::PanicInfo<'_>) -> ! { | ||
loop {} | ||
} | ||
|
||
pub fn main() {} |
18 changes: 18 additions & 0 deletions
18
checks/mkDummySrcTests/workspace-inheritance/expected/print/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[dependencies] | ||
[dependencies.hello] | ||
path = "../hello" | ||
version = "*" | ||
|
||
[dependencies.world] | ||
path = "../world" | ||
version = "*" | ||
|
||
[package] | ||
build = "cranespecific-dummy.rs" | ||
name = "print" | ||
|
||
[package.edition] | ||
workspace = true | ||
|
||
[package.version] | ||
workspace = true |
9 changes: 9 additions & 0 deletions
9
checks/mkDummySrcTests/workspace-inheritance/expected/print/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![allow(dead_code)] | ||
#![cfg_attr(target_os = "none", no_std)] | ||
|
||
#[cfg_attr(target_os = "none", panic_handler)] | ||
fn panic(_info: &::core::panic::PanicInfo<'_>) -> ! { | ||
loop {} | ||
} | ||
|
||
pub fn main() {} |
9 changes: 9 additions & 0 deletions
9
checks/mkDummySrcTests/workspace-inheritance/expected/world/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
build = "cranespecific-dummy.rs" | ||
name = "world" | ||
|
||
[package.edition] | ||
workspace = true | ||
|
||
[package.version] | ||
workspace = true |
9 changes: 9 additions & 0 deletions
9
checks/mkDummySrcTests/workspace-inheritance/expected/world/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![allow(dead_code)] | ||
#![cfg_attr(target_os = "none", no_std)] | ||
|
||
#[cfg_attr(target_os = "none", panic_handler)] | ||
fn panic(_info: &::core::panic::PanicInfo<'_>) -> ! { | ||
loop {} | ||
} | ||
|
||
pub fn main() {} |
19 changes: 19 additions & 0 deletions
19
checks/mkDummySrcTests/workspace-inheritance/input/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
checks/mkDummySrcTests/workspace-inheritance/input/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[workspace] | ||
# NB: hello and world are intentionally left out cargo will | ||
# promote them to members since they are listed as path deps | ||
members = ["print"] | ||
|
||
[workspace.package] | ||
edition = "2021" | ||
version = "0.2.0" |
4 changes: 4 additions & 0 deletions
4
checks/mkDummySrcTests/workspace-inheritance/input/hello/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
name = "hello" | ||
version.workspace = true | ||
edition.workspace = true |
3 changes: 3 additions & 0 deletions
3
checks/mkDummySrcTests/workspace-inheritance/input/hello/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn hello() -> &'static str { | ||
"hello" | ||
} |
8 changes: 8 additions & 0 deletions
8
checks/mkDummySrcTests/workspace-inheritance/input/print/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "print" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
hello = { version = "*", path = "../hello" } | ||
world = { version = "*", path = "../world" } |
3 changes: 3 additions & 0 deletions
3
checks/mkDummySrcTests/workspace-inheritance/input/print/src/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("{}, {}", hello::hello(), world::world()); | ||
} |
4 changes: 4 additions & 0 deletions
4
checks/mkDummySrcTests/workspace-inheritance/input/world/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
name = "world" | ||
version.workspace = true | ||
edition.workspace = true |
3 changes: 3 additions & 0 deletions
3
checks/mkDummySrcTests/workspace-inheritance/input/world/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn world() -> &'static str { | ||
"world!" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[workspace] | ||
# NB: hello and world are intentionally left out cargo will | ||
# promote them to members since they are listed as path deps | ||
members = ["print"] | ||
|
||
[workspace.package] | ||
edition = "2021" | ||
version = "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
name = "hello" | ||
version.workspace = true | ||
edition.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn hello() -> &'static str { | ||
"hello" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "print" | ||
version.workspace = true | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
hello = { version = "*", path = "../hello" } | ||
world = { version = "*", path = "../world" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("{}, {}", hello::hello(), world::world()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
name = "world" | ||
version.workspace = true | ||
edition.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub fn world() -> &'static str { | ||
"world!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters