Closed Bug 1273246 Opened 4 years ago Closed 4 years ago

AttributeError: 'MozbuildObject' object has no attribute 'bin_dir'

Categories

(Testing :: Mochitest, defect)

defect
Not set

Tracking

(firefox49 fixed)

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

I have a build with ac_add_options --enable-dmd (and other stuff).

When I try to run
  ./mach mochitest --dmd

I get the error:

Error running mach:
    ['mochitest', '--dmd']

The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.

[...]

AttributeError: 'MozbuildObject' object has no attribute 'bin_dir'

  File "/home/amccreight/mc/python/mach/mach/main.py", line 343, in run
    return self._run(argv)
  File "/home/amccreight/mc/python/mach/mach/main.py", line 395, in _run
    args = parser.parse_args(argv)
  File "/usr/lib/python2.7/argparse.py", line 1701, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1921, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1898, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/amccreight/mc/python/mach/mach/dispatcher.py", line 208, in __call__
    command_namespace, extra = subparser.parse_known_args(args)
  File "/home/amccreight/mc/obj-dmd-debug/_tests/testing/mochitest/mochitest_options.py", line 1259, in parse_known_args
    return (self.validate(args), remainder)
  File "/home/amccreight/mc/obj-dmd-debug/_tests/testing/mochitest/mochitest_options.py", line 1251, in validate
    args = container.validate(self, args, self.context)
  File "/home/amccreight/mc/obj-dmd-debug/_tests/testing/mochitest/mochitest_options.py", line 663, in validate
    options.dmdPath = build_obj.bin_dir
It looks like maybe this is supposed to be build_obj.bindir now.
Assignee: nobody → continuation
This fixes DMD for me locally, but I have no idea if this is right or not.
Attachment #8753091 - Flags: review?(ahalberstadt)
Component: mach → Build Config
Component: Build Config → Mochitest
Product: Core → Testing
Comment on attachment 8753091 [details] [diff] [review]
Fix use of bindir in mochitest mach --dmd code.

Review of attachment 8753091 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8753091 - Flags: review?(ahalberstadt) → review+
https://hg.mozilla.org/mozilla-central/rev/9dfa2037416f
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.