This is an automated email from the ASF dual-hosted git repository. hsun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git
commit d3d48ad854f271f94d2fe992e79cc06a16a7e123 Author: sunhe05 <[email protected]> AuthorDate: Mon Mar 13 08:09:58 2023 +0000 Reorganize scripts and tool --- README.md | 2 +- cmake/TeaclaveGenVars.cmake | 2 +- cmake/scripts/parse_cargo_packages.py | 4 ++-- cmake/tomls/Cargo.sgx_trusted_lib.toml | 2 +- cmake/tomls/Cargo.sgx_untrusted_app.toml | 2 +- docs/README.md | 2 +- docs/development-tips.md | 2 +- tools/README.md | 9 +++++++++ {scripts => tools/scripts}/ide.sh | 0 {tool => tools/sgx_tool}/README.md | 4 ---- {tool => tools/sgx_tool}/app/Cargo.toml | 4 ++-- {tool => tools/sgx_tool}/app/build.rs | 0 {tool => tools/sgx_tool}/app/src/main.rs | 0 {tool => tools/sgx_tool}/enclave/Cargo.toml | 8 ++++---- {tool => tools/sgx_tool}/enclave/Enclave.config.xml | 0 {tool => tools/sgx_tool}/enclave/src/lib.rs | 0 16 files changed, 23 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index beb2f234..d0c9b86d 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ platform, making computation on privacy-sensitive data safe and simple. - [Teaclave Worker](worker) - [Test Harness and Test Cases](tests) - [Third-Party Dependency Vendoring](third_party) -- [Tool](tool) +- [Tools](tools) - [Types](types) ### API References diff --git a/cmake/TeaclaveGenVars.cmake b/cmake/TeaclaveGenVars.cmake index 2ccbb63d..68773be6 100644 --- a/cmake/TeaclaveGenVars.cmake +++ b/cmake/TeaclaveGenVars.cmake @@ -24,7 +24,7 @@ set(TEACLAVE_SERVICE_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/services) set(TEACLAVE_EXAMPLE_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/examples) set(TEACLAVE_BIN_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/bin) set(TEACLAVE_CLI_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/cli) -set(TEACLAVE_TOOL_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/tool) +set(TEACLAVE_TOOL_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/tools) set(TEACLAVE_DCAP_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/dcap) set(TEACLAVE_LIB_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/lib) set(TEACLAVE_DOC_INSTALL_DIR ${TEACLAVE_INSTALL_DIR}/docs) diff --git a/cmake/scripts/parse_cargo_packages.py b/cmake/scripts/parse_cargo_packages.py index 457b9c77..2337473b 100644 --- a/cmake/scripts/parse_cargo_packages.py +++ b/cmake/scripts/parse_cargo_packages.py @@ -80,8 +80,8 @@ def pkg_path_2_category(pkg_path): return 'examples' elif pkg_path.startswith('tests/'): return 'tests' - elif pkg_path.startswith('tool/'): - return 'tool' + elif pkg_path.startswith('tools/'): + return 'tools' elif pkg_path == 'cli': return 'cli' elif pkg_path == 'dcap': diff --git a/cmake/tomls/Cargo.sgx_trusted_lib.toml b/cmake/tomls/Cargo.sgx_trusted_lib.toml index 74396e75..b07e2c81 100644 --- a/cmake/tomls/Cargo.sgx_trusted_lib.toml +++ b/cmake/tomls/Cargo.sgx_trusted_lib.toml @@ -28,7 +28,7 @@ members = [ "tests/unit/enclave", "tests/functional/enclave", "tests/integration/enclave", - "tool/enclave", + "tools/sgx_tool/enclave", ] exclude = [ diff --git a/cmake/tomls/Cargo.sgx_untrusted_app.toml b/cmake/tomls/Cargo.sgx_untrusted_app.toml index 6f3b3ce2..017840a9 100644 --- a/cmake/tomls/Cargo.sgx_untrusted_app.toml +++ b/cmake/tomls/Cargo.sgx_untrusted_app.toml @@ -29,7 +29,7 @@ members = [ "tests/unit/app", "tests/functional/app", "tests/integration/app", - "tool/app", + "tools/sgx_tool/app", ] exclude = [ diff --git a/docs/README.md b/docs/README.md index 0366c56e..09ded691 100644 --- a/docs/README.md +++ b/docs/README.md @@ -51,7 +51,7 @@ permalink: /docs/ - [Teaclave Worker](../worker/README.md) - [Test Harness and Test Cases](../tests/README.md) - [Third-Party Dependency Vendoring](../third_party/README.md) -- [Tool](../tool/README.md) +- [Tools](../tools/README.md) - [Types](../types/README.md) ## API References diff --git a/docs/development-tips.md b/docs/development-tips.md index 6659b0c5..b9bb2296 100644 --- a/docs/development-tips.md +++ b/docs/development-tips.md @@ -35,7 +35,7 @@ applications such as CLI, no `Cargo.toml` is needed. After the preparation of will see type hints and cross references using IDEs with extensions. ::: tip NOTE -You can also simply use the script `scripts/ide.sh <trusted|untrusted|clean>` +You can also simply use the script `tools/scripts/ide.sh <trusted|untrusted|clean>` to prepare a IDE-friendly developing environment for trusted part, untrusetd part, or remove the files generated by this script. ::: diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 00000000..f64f0195 --- /dev/null +++ b/tools/README.md @@ -0,0 +1,9 @@ +--- +permalink: /docs/codebase/tools +--- + +# Tools + +This directory contains help tools: +- scripts: tools in the script form +- sgx_tool: Teaclave SGX Tool diff --git a/scripts/ide.sh b/tools/scripts/ide.sh similarity index 100% rename from scripts/ide.sh rename to tools/scripts/ide.sh diff --git a/tool/README.md b/tools/sgx_tool/README.md similarity index 97% rename from tool/README.md rename to tools/sgx_tool/README.md index 48dc6044..329cfd85 100644 --- a/tool/README.md +++ b/tools/sgx_tool/README.md @@ -1,7 +1,3 @@ ---- -permalink: /docs/codebase/tool ---- - # Teaclave SGX Tool This tool is to dump some SGX related information, e.g., hardware and software diff --git a/tool/app/Cargo.toml b/tools/sgx_tool/app/Cargo.toml similarity index 89% rename from tool/app/Cargo.toml rename to tools/sgx_tool/app/Cargo.toml index f29d9fd5..65cd3ac3 100644 --- a/tool/app/Cargo.toml +++ b/tools/sgx_tool/app/Cargo.toml @@ -33,7 +33,7 @@ serde_json = { version = "1.0.39" } raw-cpuid = "8.1.0" structopt = "0.3" -teaclave_binder = { path = "../../binder", features = ["app"] } -teaclave_types = { path = "../../types", features = ["app"] } +teaclave_binder = { path = "../../../binder", features = ["app"] } +teaclave_types = { path = "../../../types", features = ["app"] } sgx_types = { version = "2.0.0" } diff --git a/tool/app/build.rs b/tools/sgx_tool/app/build.rs similarity index 100% rename from tool/app/build.rs rename to tools/sgx_tool/app/build.rs diff --git a/tool/app/src/main.rs b/tools/sgx_tool/app/src/main.rs similarity index 100% rename from tool/app/src/main.rs rename to tools/sgx_tool/app/src/main.rs diff --git a/tool/enclave/Cargo.toml b/tools/sgx_tool/enclave/Cargo.toml similarity index 85% rename from tool/enclave/Cargo.toml rename to tools/sgx_tool/enclave/Cargo.toml index 69ef3d76..188ff171 100644 --- a/tool/enclave/Cargo.toml +++ b/tools/sgx_tool/enclave/Cargo.toml @@ -46,10 +46,10 @@ base64 = { version = "0.13.0" } thiserror = { version = "1.0.9" } -teaclave_attestation = { path = "../../attestation" } -teaclave_binder = { path = "../../binder" } -teaclave_service_enclave_utils = { path = "../../services/utils/service_enclave_utils" } -teaclave_types = { path = "../../types" } +teaclave_attestation = { path = "../../../attestation" } +teaclave_binder = { path = "../../../binder" } +teaclave_service_enclave_utils = { path = "../../../services/utils/service_enclave_utils" } +teaclave_types = { path = "../../../types" } [target.'cfg(not(target_vendor = "teaclave"))'.dependencies] sgx_types = { version = "2.0.0" } diff --git a/tool/enclave/Enclave.config.xml b/tools/sgx_tool/enclave/Enclave.config.xml similarity index 100% rename from tool/enclave/Enclave.config.xml rename to tools/sgx_tool/enclave/Enclave.config.xml diff --git a/tool/enclave/src/lib.rs b/tools/sgx_tool/enclave/src/lib.rs similarity index 100% rename from tool/enclave/src/lib.rs rename to tools/sgx_tool/enclave/src/lib.rs --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
