<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>274880</bug_id>
          
          <creation_ts>2024-05-29 20:38:10 -0700</creation_ts>
          <short_desc>`import-w3c-tests` should provide a meaningful error when the directory doesn&apos;t exist</short_desc>
          <delta_ts>2025-06-16 16:49:07 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">marcosc</reporter>
          <assigned_to name="Sam Sneddon [:gsnedders]">gsnedders</assigned_to>
          <cc>gsnedders</cc>
    
    <cc>marcosc</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2038660</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2024-05-29 20:38:10 -0700</bug_when>
    <thetext>STR:
```

import-w3c-tests web-platform-tests/clipboard-apis --src-dir . --clean-dest-dir

```

Where the --src-dir does not contain any wpt tests (any random folder).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038661</commentid>
    <comment_count>1</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2024-05-29 20:40:50 -0700</bug_when>
    <thetext>Noting that the output form this is:

Import complete
IMPORTED 0 TOTAL TESTS
Imported 0 reftests
Imported 0 JS tests
Imported 0 Crash tests
Imported 0 pixel/manual tests

Properties needing prefixes (by count):


So, even though it claims nothing happened, it actually trashed an entire directory. That&apos;s quite unexpected and could lead to confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038662</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2024-05-29 20:41:00 -0700</bug_when>
    <thetext>Noting that the output form this is:

Import complete
IMPORTED 0 TOTAL TESTS
Imported 0 reftests
Imported 0 JS tests
Imported 0 Crash tests
Imported 0 pixel/manual tests

Properties needing prefixes (by count):


So, even though it claims nothing happened, it actually trashed an entire directory. That&apos;s quite unexpected and could lead to confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038663</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-05-29 20:41:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/128981568&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2038784</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2024-05-30 09:07:08 -0700</bug_when>
    <thetext>rdar://117683918</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2040711</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-06-10 19:29:12 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/29695</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2040830</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2024-06-11 10:52:05 -0700</bug_when>
    <thetext>The fundamental problem here is we should error out when you request to import a path that doesn&apos;t exist (because either the source directory doesn&apos;t exist, or the path doesn&apos;t exist within the source directory), rather than continuing and importing the zero tests within the non-existent path, and with `--clean-dest-dir` deleting any currently imported tests because those tests don&apos;t exist in the non-existent path.

That makes the same as rdar://117683918, which wasn&apos;t specifically about the `--clean-dest-dir` case, but was about confusion with nothing getting imported when a non-existent path is passed (because it just does nothing at all without `--clean-dest-dir`).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2040868</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-06-11 14:53:12 -0700</bug_when>
    <thetext>&gt; The fundamental problem here is we should error out when you request to import a path that doesn&apos;t exist

yes that&apos;s the goal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2120738</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2025-05-30 11:30:10 -0700</bug_when>
    <thetext>*** Bug 277278 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2124091</commentid>
    <comment_count>9</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2025-06-16 16:49:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46826</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>