Skip to content

Commit

Permalink
Merge pull request #9 from disktnk/fix/file-sep
Browse files Browse the repository at this point in the history
Fix filepath separator on applyging hint
  • Loading branch information
imos authored May 30, 2019
2 parents 0b66fd5 + 75e6efd commit 839daa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/xpytest/xpytest.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (x *Xpytest) ApplyHint(h *xpytest_proto.HintFile) error {
rule := rules[len(rules)-i-1]
for _, tq := range x.GetTests() {
if tq.GetFile() == rule.GetName() ||
strings.HasSuffix(tq.GetFile(), "/"+rule.GetName()) {
strings.HasSuffix(tq.GetFile(), string(filepath.Separator)+
rule.GetName()) {
tq.Priority = int32(priority)
if rule.GetDeadline() != 0 {
tq.Deadline = rule.GetDeadline()
Expand Down

0 comments on commit 839daa7

Please sign in to comment.