summaryrefslogtreecommitdiffstats
path: root/tests/run-make/emit-shared-files
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/run-make/emit-shared-files
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/emit-shared-files')
-rw-r--r--tests/run-make/emit-shared-files/Makefile46
-rw-r--r--tests/run-make/emit-shared-files/x.rs1
-rw-r--r--tests/run-make/emit-shared-files/y.css0
-rw-r--r--tests/run-make/emit-shared-files/z.css0
4 files changed, 47 insertions, 0 deletions
diff --git a/tests/run-make/emit-shared-files/Makefile b/tests/run-make/emit-shared-files/Makefile
new file mode 100644
index 000000000..cad0c9e5b
--- /dev/null
+++ b/tests/run-make/emit-shared-files/Makefile
@@ -0,0 +1,46 @@
+include ../../run-make-fulldeps/tools.mk
+
+INVOCATION_ONLY = $(TMPDIR)/invocation-only
+TOOLCHAIN_ONLY = $(TMPDIR)/toolchain-only
+ALL_SHARED = $(TMPDIR)/all-shared
+
+all: invocation-only toolchain-only all-shared
+
+invocation-only:
+ $(RUSTDOC) -Z unstable-options --emit=invocation-specific --output $(INVOCATION_ONLY) --resource-suffix=-xxx --theme y.css --extend-css z.css x.rs
+ [ -e $(INVOCATION_ONLY)/search-index-xxx.js ]
+ [ -e $(INVOCATION_ONLY)/settings.html ]
+ [ -e $(INVOCATION_ONLY)/x/all.html ]
+ [ -e $(INVOCATION_ONLY)/x/index.html ]
+ [ -e $(INVOCATION_ONLY)/theme-xxx.css ] # generated from z.css
+ ! [ -e $(INVOCATION_ONLY)/storage-xxx.js ]
+ ! [ -e $(INVOCATION_ONLY)/SourceSerif4-It.ttf.woff2 ]
+
+ # FIXME: this probably shouldn't have a suffix
+ [ -e $(INVOCATION_ONLY)/y-xxx.css ]
+ # FIXME: this is technically incorrect (see `write_shared`)
+ ! [ -e $(INVOCATION_ONLY)/main-xxx.js ]
+
+toolchain-only:
+ $(RUSTDOC) -Z unstable-options --emit=toolchain-shared-resources --output $(TOOLCHAIN_ONLY) --resource-suffix=-xxx --extend-css z.css x.rs
+ [ -e $(TOOLCHAIN_ONLY)/static.files/storage-*.js ]
+ [ -e $(TOOLCHAIN_ONLY)/static.files/SourceSerif4-It-*.ttf.woff2 ]
+ ! [ -e $(TOOLCHAIN_ONLY)/search-index-xxx.js ]
+ ! [ -e $(TOOLCHAIN_ONLY)/x/index.html ]
+ ! [ -e $(TOOLCHAIN_ONLY)/theme.css ]
+
+ [ -e $(TOOLCHAIN_ONLY)/static.files/main-*.js ]
+ ! [ -e $(TOOLCHAIN_ONLY)/y-xxx.css ]
+
+all-shared:
+ $(RUSTDOC) -Z unstable-options --emit=toolchain-shared-resources,unversioned-shared-resources --output $(ALL_SHARED) --resource-suffix=-xxx --extend-css z.css x.rs
+ [ -e $(ALL_SHARED)/static.files/storage-*.js ]
+ [ -e $(ALL_SHARED)/static.files/SourceSerif4-It-*.ttf.woff2 ]
+ ! [ -e $(ALL_SHARED)/search-index-xxx.js ]
+ ! [ -e $(ALL_SHARED)/settings.html ]
+ ! [ -e $(ALL_SHARED)/x ]
+ ! [ -e $(ALL_SHARED)/src ]
+ ! [ -e $(ALL_SHARED)/theme.css ]
+
+ [ -e $(ALL_SHARED)/static.files/main-*.js ]
+ ! [ -e $(ALL_SHARED)/y-xxx.css ]
diff --git a/tests/run-make/emit-shared-files/x.rs b/tests/run-make/emit-shared-files/x.rs
new file mode 100644
index 000000000..5df757613
--- /dev/null
+++ b/tests/run-make/emit-shared-files/x.rs
@@ -0,0 +1 @@
+// nothing to see here
diff --git a/tests/run-make/emit-shared-files/y.css b/tests/run-make/emit-shared-files/y.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/run-make/emit-shared-files/y.css
diff --git a/tests/run-make/emit-shared-files/z.css b/tests/run-make/emit-shared-files/z.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/run-make/emit-shared-files/z.css