diff --git a/src/build/adapter_filesystem.cc b/src/build/adapter_filesystem.cc index 1e4e9e2e..bead7581 100644 --- a/src/build/adapter_filesystem.cc +++ b/src/build/adapter_filesystem.cc @@ -77,8 +77,6 @@ auto BuildAdapterFilesystem::write_dependencies( this->refresh(path); const auto dependencies_path{this->dependencies_path(path)}; std::filesystem::create_directories(dependencies_path.parent_path()); - // To reset the inode and correctly handle hard links - std::filesystem::remove(dependencies_path); std::ofstream dependencies_stream{dependencies_path}; assert(!dependencies_stream.fail()); for (const auto &dependency : dependencies) { diff --git a/src/index/generators.h b/src/index/generators.h index 6270359c..fa5dcc8c 100644 --- a/src/index/generators.h +++ b/src/index/generators.h @@ -562,8 +562,6 @@ struct GENERATE_URITEMPLATE_ROUTES { const sourcemeta::one::BuildDynamicCallback &, const Context &router) -> void { std::filesystem::create_directories(destination.parent_path()); - // To reset the inode and correctly handle hard links - std::filesystem::remove(destination); sourcemeta::core::URITemplateRouterView::save(router, destination); } }; diff --git a/src/index/index.cc b/src/index/index.cc index 66a07958..3e6d32af 100644 --- a/src/index/index.cc +++ b/src/index/index.cc @@ -1,6 +1,5 @@ #include -#include #include #include #include @@ -24,7 +23,6 @@ #include // EXIT_FAILURE, EXIT_SUCCESS #include // std::exception #include // std::filesystem -#include // std::ofstream #include // std::setw, std::setfill #include // std::cerr, std::cout #include // std::string @@ -52,9 +50,6 @@ // the resolver will not unescape it back when computing the relative path to an // entry constexpr auto SENTINEL{"%"}; -constexpr std::string_view STAGING_DIRECTORY{".sourcemeta-one-staging"}; -constexpr std::string_view STAGING_COMMITTED{ - ".sourcemeta-one-staging-committed"}; static auto attribute_not_disabled( const sourcemeta::one::Configuration::Collection &collection, @@ -116,17 +111,17 @@ static auto index_main(const std::string_view &program, // (1) Parse the output directory ///////////////////////////////////////////////////////////////////////////// - const auto final_output_path{ + const auto output_path{ std::filesystem::weakly_canonical(app.positional().at(1))}; - if (std::filesystem::exists(final_output_path) && - !std::filesystem::is_directory(final_output_path)) { + if (std::filesystem::exists(output_path) && + !std::filesystem::is_directory(output_path)) { throw std::filesystem::filesystem_error{ - "file already exists", final_output_path, + "file already exists", output_path, std::make_error_code(std::errc::file_exists)}; } - std::cerr << "Writing output to: " << final_output_path.string() << "\n"; + std::cerr << "Writing output to: " << output_path.string() << "\n"; ///////////////////////////////////////////////////////////////////////////// // (2) Process the configuration file @@ -183,42 +178,10 @@ static auto index_main(const std::string_view &program, } ///////////////////////////////////////////////////////////////////////////// - // (5) Prepare the output directory via staging for atomic commits - ///////////////////////////////////////////////////////////////////////////// - - // Place the staging directory as a sibling of the final output path to - // guarantee both reside on the same filesystem volume, which is required - // for the atomic rename to succeed - const auto staging_path{final_output_path.parent_path() / - std::string{STAGING_DIRECTORY}}; - // After an atomic swap, the staging directory already contains the previous - // committed output, so we can reuse it directly. However, if the process - // crashed mid-build, staging may be in a dirty state. We use a sentinel - // file to distinguish clean staging (from a completed swap) from dirty - // staging (from a crash). If dirty, we discard and re-bootstrap. - const auto staging_sentinel{final_output_path.parent_path() / - std::string{STAGING_COMMITTED}}; - if (std::filesystem::exists(staging_path) && - !std::filesystem::exists(staging_sentinel)) { - std::cerr << "Discarding dirty staging directory\n"; - std::filesystem::remove_all(staging_path); - } - - if (!std::filesystem::exists(staging_path)) { - if (std::filesystem::exists(final_output_path)) { - std::cerr << "Hardlinking: " << final_output_path.string() << " => " - << staging_path.string() << "\n"; - sourcemeta::core::hardlink_directory(final_output_path, staging_path); - } else { - std::filesystem::create_directories(staging_path); - } - } - - // Remove the sentinel before building so that a crash leaves staging - // recognizable as dirty - std::filesystem::remove(staging_sentinel); + // (5) Prepare the output directory + ///////////////////////////////////////////////////////////////////////////// - sourcemeta::one::Output output{staging_path}; + sourcemeta::one::Output output{output_path}; ///////////////////////////////////////////////////////////////////////////// // (6) Store a mark of the One version for target dependencies @@ -790,19 +753,6 @@ static auto index_main(const std::string_view &program, PROFILE_END(profiling, "Profile"); - std::cerr << "Committing: " << staging_path.string() << " => " - << final_output_path.string() << "\n"; - sourcemeta::core::atomic_directory_swap(final_output_path, staging_path); - - // Mark the staging directory as clean so the next run knows it can be - // safely reused. On the very first run the swap is a plain rename and - // staging no longer exists, but writing the sentinel is still harmless - // because the next run will see no staging directory and bootstrap fresh. - std::ofstream sentinel_stream(staging_sentinel); - sentinel_stream.close(); - - PROFILE_END(profiling, "Commit"); - if (app.contains("time")) { for (const auto &entry : profiling.first) { std::cout << entry.second.count() << "ms " << entry.first << "\n"; diff --git a/src/index/output.h b/src/index/output.h index ae43cea2..384876f4 100644 --- a/src/index/output.h +++ b/src/index/output.h @@ -8,6 +8,7 @@ #include // assert #include // std::filesystem +#include // std::ofstream #include // std::shared_mutex, std::shared_lock #include // std::unordered_map @@ -85,8 +86,6 @@ class Output { -> const std::filesystem::path & { assert(path.is_absolute()); std::filesystem::create_directories(path.parent_path()); - // To reset the inode and correctly handle hard links - std::filesystem::remove(path); std::ofstream stream{path}; assert(!stream.fail()); sourcemeta::core::stringify(document, stream); diff --git a/src/shared/metapack.cc b/src/shared/metapack.cc index 6fbb0e6e..fa5caebf 100644 --- a/src/shared/metapack.cc +++ b/src/shared/metapack.cc @@ -57,8 +57,6 @@ auto write_stream(const std::filesystem::path &path, metadata.assign("extension", extension); } - // To reset the inode and correctly handle hard links - std::filesystem::remove(path); std::ofstream output{path}; assert(!output.fail()); sourcemeta::core::stringify(metadata, output); diff --git a/test/cli/CMakeLists.txt b/test/cli/CMakeLists.txt index 220c9a4f..0cf210ae 100644 --- a/test/cli/CMakeLists.txt +++ b/test/cli/CMakeLists.txt @@ -58,10 +58,6 @@ if(ONE_INDEX) sourcemeta_one_test_cli(common index non-existent-collection-directory) sourcemeta_one_test_cli(common index collection-path-is-file) sourcemeta_one_test_cli(common index deps-contents) - sourcemeta_one_test_cli(common index inode-reset-on-rebuild) - sourcemeta_one_test_cli(common index atomic-failure) - sourcemeta_one_test_cli(common index stale-staging-cleanup) - sourcemeta_one_test_cli(common index configuration-no-stale-cleanup) sourcemeta_one_test_cli(common index rebuild-zero-to-one) sourcemeta_one_test_cli(common index rebuild-one-to-zero) sourcemeta_one_test_cli(common index resolve-schema) diff --git a/test/cli/index/common/atomic-failure.sh b/test/cli/index/common/atomic-failure.sh deleted file mode 100755 index 0e1b8614..00000000 --- a/test/cli/index/common/atomic-failure.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -set -o errexit -set -o nounset - -TMP="$(mktemp -d)" -clean() { rm -rf "$TMP"; } -trap clean EXIT - -cat << EOF > "$TMP/one.json" -{ - "url": "https://sourcemeta.com/", - "contents": { - "schemas": { - "baseUri": "https://example.com/", - "path": "./schemas" - } - } -} -EOF - -mkdir "$TMP/schemas" - -cat << 'EOF' > "$TMP/schemas/test.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/test" -} -EOF - -hash_directory() { - { find "$1" -type f -exec md5sum {} \; 2>/dev/null \ - || find "$1" -type f -exec md5 -r {} \; ; } \ - | sort > "$2" -} - -# Index successfully -"$1" "$TMP/one.json" "$TMP/output" -hash_directory "$TMP/output" "$TMP/snapshot_before.txt" - -# Break the schema so the next index run fails -cat << 'EOF' > "$TMP/schemas/test.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/test", - "type": 1 -} -EOF - -# Re-index, expecting failure -"$1" "$TMP/one.json" "$TMP/output" 2>/dev/null && CODE="$?" || CODE="$?" -test "$CODE" = "1" - -# Verify the output directory is untouched -hash_directory "$TMP/output" "$TMP/snapshot_after.txt" -diff "$TMP/snapshot_before.txt" "$TMP/snapshot_after.txt" - -# Verify no hidden files or directories were left behind other than -# the persistent staging directory and its sentinel -HIDDEN="$(find "$TMP" -maxdepth 1 -name '.*' ! -name '.' \ - ! -name '.sourcemeta-one-staging*' | wc -l | tr -d ' ')" -test "$HIDDEN" = "0" diff --git a/test/cli/index/common/comment-removed-on-rebuild.sh b/test/cli/index/common/comment-removed-on-rebuild.sh index d7f404b5..9746804e 100755 --- a/test/cli/index/common/comment-removed-on-rebuild.sh +++ b/test/cli/index/common/comment-removed-on-rebuild.sh @@ -35,7 +35,6 @@ Using configuration: $(realpath "$TMP")/one.json ( 0%) Producing: explorer (100%) Producing: . (100%) Rendering: . -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -51,7 +50,6 @@ remove_threads_information "$TMP/output.txt" cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json -Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-staging ( 50%) Reviewing: schemas (100%) Reviewing: schemas ( 0%) Producing: explorer @@ -61,7 +59,6 @@ Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-sta (skip) Rendering: . [index] (skip) Rendering: . [not-found] (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/comment-updated-on-rebuild.sh b/test/cli/index/common/comment-updated-on-rebuild.sh index c3448988..0b2f03c9 100755 --- a/test/cli/index/common/comment-updated-on-rebuild.sh +++ b/test/cli/index/common/comment-updated-on-rebuild.sh @@ -35,7 +35,6 @@ Using configuration: $(realpath "$TMP")/one.json ( 0%) Producing: explorer (100%) Producing: . (100%) Rendering: . -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -51,7 +50,6 @@ remove_threads_information "$TMP/output.txt" cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json -Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-staging ( 50%) Reviewing: schemas (100%) Reviewing: schemas ( 0%) Producing: explorer @@ -61,7 +59,6 @@ Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-sta (skip) Rendering: . [index] (skip) Rendering: . [not-found] (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/configuration-no-stale-cleanup.sh b/test/cli/index/common/configuration-no-stale-cleanup.sh deleted file mode 100755 index f4dc1c2c..00000000 --- a/test/cli/index/common/configuration-no-stale-cleanup.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -set -o errexit -set -o nounset - -TMP="$(mktemp -d)" -clean() { rm -rf "$TMP"; } -trap clean EXIT - -cat << EOF > "$TMP/one.json" -{ - "url": "https://sourcemeta.com/", - "contents": { - "example": { - "contents": { - "schemas": { - "baseUri": "https://example.com/", - "path": "./schemas" - } - } - } - } -} -EOF - -mkdir "$TMP/schemas" - -cat << 'EOF' > "$TMP/schemas/foo.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/foo" -} -EOF - -# Simulate stale staging directories left behind by crashed previous runs -mkdir "$TMP/.sourcemeta-one-aaa" -mkdir "$TMP/.sourcemeta-one-bbb" -mkdir "$TMP/.sourcemeta-one-ccc" - -"$1" --skip-banner "$TMP/one.json" "$TMP/output" --configuration > /dev/null 2> "$TMP/output.txt" - -cat << EOF > "$TMP/expected.txt" -Writing output to: $(realpath "$TMP")/output -Using configuration: $(realpath "$TMP")/one.json -EOF -diff "$TMP/output.txt" "$TMP/expected.txt" - -# Verify the stale directories were NOT cleaned up -test -d "$TMP/.sourcemeta-one-aaa" -test -d "$TMP/.sourcemeta-one-bbb" -test -d "$TMP/.sourcemeta-one-ccc" diff --git a/test/cli/index/common/inode-reset-on-rebuild.sh b/test/cli/index/common/inode-reset-on-rebuild.sh deleted file mode 100755 index 49c6d282..00000000 --- a/test/cli/index/common/inode-reset-on-rebuild.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -set -o errexit -set -o nounset - -TMP="$(mktemp -d)" -clean() { rm -rf "$TMP"; } -trap clean EXIT - -cat << EOF > "$TMP/one.json" -{ - "url": "https://sourcemeta1.com/", - "contents": { - "schemas": { - "baseUri": "https://example.com/", - "path": "./schemas" - } - } -} -EOF - -mkdir "$TMP/schemas" - -cat << 'EOF' > "$TMP/schemas/test.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/test" -} -EOF - -collect_inodes() { - find "$1" -type f -exec ls -i {} \; \ - | awk '{print $2, $1}' | sort > "$2" - # Confirm the file is not empty - test "$(wc -l < "$2" | tr -d ' ')" -gt 0 - # For debugging - cat "$2" 1>&2 -} - -"$1" "$TMP/one.json" "$TMP/output" -collect_inodes "$TMP/output" "$TMP/inodes_before.txt" - -# Pin the original inodes by hard-linking every file into a mirror -# directory. This prevents the filesystem from reusing freed inode -# numbers when the indexer removes and recreates files. -cd "$TMP/output" -find . -type d | while read -r directory -do - mkdir -p "$TMP/mirror/$directory" -done -find . -type f | while read -r file -do - ln "$file" "$TMP/mirror/$file" -done -cd - - -# Change the registry URL and modify the schema to force all targets to rebuild -cat << EOF > "$TMP/one.json" -{ - "url": "https://sourcemeta2.com/", - "contents": { - "schemas": { - "baseUri": "https://example.com/", - "path": "./schemas" - } - } -} -EOF - -cat << 'EOF' > "$TMP/schemas/test.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/test", - "type": "string" -} -EOF - -"$1" "$TMP/one.json" "$TMP/output" -collect_inodes "$TMP/output" "$TMP/inodes_after.txt" - -# Exactly 1 shared inode is expected: the version mark. All other files -# must have been removed and recreated with fresh inodes. -SHARED="$(grep --fixed-strings --line-regexp \ - --file="$TMP/inodes_before.txt" "$TMP/inodes_after.txt" || true)" -test "$(echo "$SHARED" | wc -l | tr -d ' ')" = "1" -echo "$SHARED" | grep --quiet "version.json" diff --git a/test/cli/index/common/rebuild-cache.sh b/test/cli/index/common/rebuild-cache.sh index d0a4be58..ef65f0c0 100755 --- a/test/cli/index/common/rebuild-cache.sh +++ b/test/cli/index/common/rebuild-cache.sh @@ -61,7 +61,6 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) ( 50%) Rendering: example ( 75%) Rendering: . (100%) Rendering: example/schemas/foo -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -72,7 +71,6 @@ remove_threads_information "$TMP/output.txt" cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json -Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-staging Detecting: $(realpath "$TMP")/schemas/foo.json (#1) (100%) Resolving: foo.json (100%) Ingesting: https://sourcemeta.com/example/schemas/foo @@ -111,7 +109,6 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) (100%) Rendering: example/schemas/foo (skip) Rendering: example/schemas/foo [schema] (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -145,7 +142,6 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) (skip) Rendering: . [not-found] (100%) Rendering: example/schemas/foo (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -171,6 +167,5 @@ Detecting: $(realpath "$TMP")/schemas/foo.json (#1) ( 50%) Rendering: example ( 75%) Rendering: . (100%) Rendering: example/schemas/foo -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/rebuild-one-to-zero.sh b/test/cli/index/common/rebuild-one-to-zero.sh index 7ed7d283..7b6f8370 100755 --- a/test/cli/index/common/rebuild-one-to-zero.sh +++ b/test/cli/index/common/rebuild-one-to-zero.sh @@ -57,7 +57,6 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) ( 33%) Rendering: schemas ( 66%) Rendering: . (100%) Rendering: schemas/test -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -132,7 +131,6 @@ remove_threads_information "$TMP/output.txt" cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json -Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-staging ( 50%) Reviewing: schemas (100%) Reviewing: schemas ( 0%) Producing: explorer @@ -140,7 +138,6 @@ Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-sta (100%) Rendering: . (skip) Rendering: . [not-found] (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/rebuild-zero-to-one.sh b/test/cli/index/common/rebuild-zero-to-one.sh index ba0f365f..f89612f5 100755 --- a/test/cli/index/common/rebuild-zero-to-one.sh +++ b/test/cli/index/common/rebuild-zero-to-one.sh @@ -41,7 +41,6 @@ Using configuration: $(realpath "$TMP")/one.json ( 0%) Producing: explorer (100%) Producing: . (100%) Rendering: . -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" @@ -85,7 +84,6 @@ remove_threads_information "$TMP/output.txt" cat << EOF > "$TMP/expected.txt" Writing output to: $(realpath "$TMP")/output Using configuration: $(realpath "$TMP")/one.json -Hardlinking: $(realpath "$TMP")/output => $(realpath "$TMP")/.sourcemeta-one-staging Detecting: $(realpath "$TMP")/schemas/test.json (#1) (100%) Resolving: test.json (100%) Ingesting: https://sourcemeta.com/schemas/test @@ -101,7 +99,6 @@ Detecting: $(realpath "$TMP")/schemas/test.json (#1) (skip) Rendering: . [not-found] (100%) Rendering: schemas/test (skip) Producing: routes.bin [routes] -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/stale-staging-cleanup.sh b/test/cli/index/common/stale-staging-cleanup.sh deleted file mode 100755 index 84d726d3..00000000 --- a/test/cli/index/common/stale-staging-cleanup.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -set -o errexit -set -o nounset - -TMP="$(mktemp -d)" -clean() { rm -rf "$TMP"; } -trap clean EXIT - -cat << EOF > "$TMP/one.json" -{ - "url": "https://sourcemeta.com/", - "contents": { - "example": { - "contents": { - "schemas": { - "baseUri": "https://example.com/", - "path": "./schemas" - } - } - } - } -} -EOF - -mkdir "$TMP/schemas" - -cat << 'EOF' > "$TMP/schemas/foo.json" -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/foo" -} -EOF - -remove_threads_information() { - expr='s/ \[[^]]*[^a-z-][^]]*\]//g' - if [ "$(uname -s)" = "Darwin" ]; then - sed -i '' "$expr" "$1" - else - sed -i "$expr" "$1" - fi -} - -# Hidden entries must be preserved -mkdir "$TMP/.hidden-directory" -echo "keep" > "$TMP/.hidden-directory/data.txt" -mkdir "$TMP/.another-hidden" -echo "keep" > "$TMP/.dotfile" - -"$1" --skip-banner "$TMP/one.json" "$TMP/output" --concurrency 1 2> "$TMP/output.txt" -remove_threads_information "$TMP/output.txt" - -cat << EOF > "$TMP/expected.txt" -Writing output to: $(realpath "$TMP")/output -Using configuration: $(realpath "$TMP")/one.json -Detecting: $(realpath "$TMP")/schemas/foo.json (#1) -(100%) Resolving: foo.json -(100%) Ingesting: https://sourcemeta.com/example/schemas/foo -(100%) Analysing: https://sourcemeta.com/example/schemas/foo -( 50%) Reviewing: schemas -(100%) Reviewing: schemas -(100%) Reworking: https://sourcemeta.com/example/schemas/foo -( 0%) Producing: explorer -( 33%) Producing: example/schemas -( 66%) Producing: example -(100%) Producing: . -( 25%) Rendering: example/schemas -( 50%) Rendering: example -( 75%) Rendering: . -(100%) Rendering: example/schemas/foo -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output -EOF -diff "$TMP/output.txt" "$TMP/expected.txt" - -# Verify hidden entries were preserved -test -d "$TMP/.hidden-directory" -test -f "$TMP/.hidden-directory/data.txt" -test -d "$TMP/.another-hidden" -test -f "$TMP/.dotfile" diff --git a/test/cli/index/common/verbose-long.sh b/test/cli/index/common/verbose-long.sh index 4118b884..8824af42 100755 --- a/test/cli/index/common/verbose-long.sh +++ b/test/cli/index/common/verbose-long.sh @@ -62,6 +62,5 @@ https://example.com/foo => https://sourcemeta.com/example/schemas/foo ( 50%) Rendering: example ( 75%) Rendering: . (100%) Rendering: example/schemas/foo -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt" diff --git a/test/cli/index/common/verbose-short.sh b/test/cli/index/common/verbose-short.sh index 2e500d6b..2d38a531 100755 --- a/test/cli/index/common/verbose-short.sh +++ b/test/cli/index/common/verbose-short.sh @@ -62,6 +62,5 @@ https://example.com/foo => https://sourcemeta.com/example/schemas/foo ( 50%) Rendering: example ( 75%) Rendering: . (100%) Rendering: example/schemas/foo -Committing: $(realpath "$TMP")/.sourcemeta-one-staging => $(realpath "$TMP")/output EOF diff "$TMP/output.txt" "$TMP/expected.txt"