Repository: chipsalliance/caliptra-sw
Pull request #369 (2023-06-08 17:18:34)

Misc build cleanup.
* Rename file-header-fix crate to caliptra-file-header-fix
* Remove vestigal Cargo workspace from sw-emulator/


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index ca620855..9d6cf4f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -276,6 +276,10 @@ version = "0.1.0"
 name = "caliptra-error"
 version = "0.1.0"
 
+[[package]]
+name = "caliptra-file-header-fix"
+version = "0.1.0"
+
 [[package]]
 name = "caliptra-fmc"
 version = "0.1.0"
@@ -943,10 +947,6 @@ dependencies = [
  "subtle",
 ]
 
-[[package]]
-name = "file-header-fix"
-version = "0.1.0"
-
 [[package]]
 name = "foreign-types"
 version = "0.3.2"
diff --git a/ci-tools/file-header-fix/Cargo.toml b/ci-tools/file-header-fix/Cargo.toml
index 9d78cc4c..4562ff92 100644
--- a/ci-tools/file-header-fix/Cargo.toml
+++ b/ci-tools/file-header-fix/Cargo.toml
@@ -1,6 +1,6 @@
 # Licensed under the Apache-2.0 license
 [package]
-name = "file-header-fix"
+name = "caliptra-file-header-fix"
 version = "0.1.0"
 edition = "2021"
 
diff --git a/ci-tools/file-header-fix/README.md b/ci-tools/file-header-fix/README.md
index ebb1b78d..f29be393 100644
--- a/ci-tools/file-header-fix/README.md
+++ b/ci-tools/file-header-fix/README.md
@@ -10,10 +10,10 @@ license" in the header. Similar to cargo fmt.
 ```console
 $ cd ~/projects/caliptra-sw
 $ touch foo.rs bar.rs
-$ cargo run -p file-header-fix -- --check
+$ cargo run -p caliptra-file-header-fix -- --check
 File "./bar.rs" doesn't contain "Licensed under the Apache-2.0 license" in the first 3 lines
 File "./foo.rs" doesn't contain "Licensed under the Apache-2.0 license" in the first 3 lines
-To fix, run "cargo run --bin file-header-fix" in the workspace directory.
+To fix, run "cargo run --bin caliptra-file-header-fix" in the workspace directory.
 $ echo $?
 2
 ```
@@ -24,7 +24,7 @@ $ echo $?
 $ cd ~/projects/caliptra-sw
 $ echo "fn main() {}" > foo.rs
 $ touch bar.py
-$ cargo run -p file-header-fix
+$ cargo run -p caliptra-file-header-fix
 $ cat foo.rs
 // Licensed under the Apache-2.0 license
 
diff --git a/rom/dev/Makefile b/rom/dev/Makefile
index f03c757d..d1d3e68a 100644
--- a/rom/dev/Makefile
+++ b/rom/dev/Makefile
@@ -98,9 +98,8 @@ objcopy:
 
 run: build-emu build-fw-image objcopy
 	cargo run \
-		--manifest-path ../../sw-emulator/Cargo.toml \
 		--release \
-		--bin caliptra-emu \
+		-p caliptra-emu \
 		-- \
 		--req-idevid-csr \
 		--idevid-key-id-algo sha1 \
@@ -110,9 +109,8 @@ run: build-emu build-fw-image objcopy
 
 run-update: build-emu build-fw-image objcopy
 		cargo run \
-		--manifest-path ../../sw-emulator/Cargo.toml \
 		--release \
-		--bin caliptra-emu \
+		-p caliptra-emu \
 		-- \
 		--req-idevid-csr \
 		--idevid-key-id-algo sha1 \
diff --git a/sw-emulator/Cargo.toml b/sw-emulator/Cargo.toml
deleted file mode 100644
index a6784a24..00000000
--- a/sw-emulator/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed under the Apache-2.0 license
-
-[workspace]
-
-members = [
-  "app",
-  "compliance-test",
-  "lib/cpu",
-  "lib/crypto",
-  "lib/derive",
-  "lib/periph",
-  "lib/types",
-]
-
-exclude = [
-  "example",
-]


Test patch:
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 03be20ea..8015425b 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -80,7 +80,7 @@ jobs:
 
       - name: Check license headers
         run: |
-          cargo run -p file-header-fix --locked -- --check
+          cargo run -p caliptra-file-header-fix --locked -- --check
 
       - name: Build
         run: |
diff --git a/ci-tools/file-header-fix/tests/integration_test.rs b/ci-tools/file-header-fix/tests/integration_test.rs
index c350f02f..afb488ea 100644
--- a/ci-tools/file-header-fix/tests/integration_test.rs
+++ b/ci-tools/file-header-fix/tests/integration_test.rs
@@ -7,7 +7,7 @@ use std::{
     process::Stdio,
 };
 
-const PROGRAM_BIN: &str = env!("CARGO_BIN_EXE_file-header-fix");
+const PROGRAM_BIN: &str = env!("CARGO_BIN_EXE_caliptra-file-header-fix");
 
 #[test]
 fn test_usage() {