Changeset 107524 for trunk/base/tests


Ignore:
Timestamp:
Jul 2, 2013, 1:13:34 AM (7 years ago)
Author:
cal@…
Message:

trace test: add non-superuser support to the Makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/tests/test/trace/Makefile

    r107523 r107524  
    1212        @PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
    1313        @mkdir -p ../tracetesttmp
    14         @chown $(RUNUSR) ../tracetesttmp || true
    15         @sudo -u $(RUNUSR) touch ../tracetesttmp/delete-trace
    16         @sudo -u $(RUNUSR) touch ../tracetesttmp/rename-trace
    17         @sudo -u $(RUNUSR) mkdir -p ../tracetesttmp/rmdir-trace
     14        @-[ "`id -u`" == "0" ] && chown $(RUNUSR) ../tracetesttmp
     15        @([ "`id -u`" == "0" ] && sudo -u $(RUNUSR) touch ../tracetesttmp/delete-trace) || touch ../tracetesttmp/delete-trace
     16        @([ "`id -u`" == "0" ] && sudo -u $(RUNUSR) touch ../tracetesttmp/rename-trace) || touch ../tracetesttmp/rename-trace
     17        @([ "`id -u`" == "0" ] && sudo -u $(RUNUSR) mkdir -p ../tracetesttmp/rmdir-trace) || mkdir -p ../tracetesttmp/rmdir-trace
    1818        @rm -f /tmp/hello-trace
    1919        @ln -sf /usr/include/unistd.h /tmp/link-trace2
    20         @chown -h $(RUNUSR) /tmp/link-trace2
     20        @-[ "`id -u`" == "0" ] && chown -h $(RUNUSR) /tmp/link-trace2
    2121        @PORTSRC=$(PORTSRC) $(bindir)/port -t test > output 2>&1 || (cat output; exit 1)
    2222        @rm -f /tmp/link-trace2
Note: See TracChangeset for help on using the changeset viewer.