Skip to content

Commit

Permalink
Add simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Jun 29, 2023
1 parent 6782bb4 commit ce5ec54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/run-make/optimization-remarks-dir/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include ../tools.mk

PROFILE_DIR=$(TMPDIR)/profiles

all: check_inline check_filter

check_inline:
$(RUSTC) -O main.rs -Cremark=all -Zremark-dir=$(PROFILE_DIR)
cat $(PROFILE_DIR)/*.opt.yaml | $(CGREP) -e "inline"
check_filter:
$(RUSTC) -O main.rs -Cremark=foo -Zremark-dir=$(PROFILE_DIR)
cat $(PROFILE_DIR)/*.opt.yaml | $(CGREP) -e -v "inline"
6 changes: 6 additions & 0 deletions tests/run-make/optimization-remarks-dir/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#[inline(never)]
fn foo() {}

fn main() {
foo();
}

0 comments on commit ce5ec54

Please sign in to comment.