[Cdash] [PATCH] Perforce support for CDash

Igor Murzov e-mail at date.by
Wed Oct 30 10:17:13 UTC 2013


> > >   $p4command = $CDASH_P4_COMMAND." ".$root." -L en";
> >
> > >  $raw_output = `$p4command changes $branch@"$fromtime","$totime"
> > > 2>&1`;
> >
> > Can it happen that $root or $CDASH_P4_COMMAND contain spaces or some
> > other special characters? I think some quoting might be needed here.
> >
> >
> > 
> I guess it could happen, yes, but wouldn't these values come already
> quoted from the configuration settings?

I'm not sure what do you mean by this. Do you want users to quote every
special character?
For instance, if $CDASH_P4_COMMAND is set like:

  $CDASH_P4_COMMAND = '/prefix/with space/p4';

then your code will fail. But it would work if $CDASH_P4_COMMAND is set
like this:

  $CDASH_P4_COMMAND = '/prefix/with\ space/p4';

If I used perforce, I would prefer the first variant :)


-- Igor



More information about the CDash mailing list