[SOLVED] phpunit tests stuck on #152

gour
gour's picture

Joined: 2005-02-10
Posts: 21
Posted: Mon, 2005-02-14 20:32

Hi!

In order to get a feeling for G2 I grabbed latest G2 build -2005-02-14 and installed it on my dev site.

Running phpunit stucks on:
152 core codeaudittest testcodeaudit

if it is of some help for developers :wink:

Sincerely,
Gour

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-02-14 21:00

thanks, but more information is needed before this is helpful....
OS, php version?
what is "stuck"? did you get any error messages? what happens if you run just that test? (enter codeaudittest in the filter box) try running only that test with buffered or immediate debug mode turned on in config.php and see if you get any useful error messages that way.

 
gour
gour's picture

Joined: 2005-02-10
Posts: 21
Posted: Mon, 2005-02-14 21:12

Hi!

OK, here are some more info:
OS: Linux 2.6.6 sparc64
Apache/2.0.50 (Gentoo/Linux) mod_ssl/2.0.50 OpenSSL/0.9.7d DAV/2 PHP/4.3.8

Running codeaudiotest gives: Fatal error: Call to undefined function: _assert() in /home/atmarama/web/gallery2/modules/core/test/phpunit/CodeAuditTest.class on line 107

Sincerely,
Gour

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-02-14 23:44

ah, that's a typo.. i fixed it.
update from cvs in a few hours or get tomorrow's nightly snapshot and let us know what the test says.. it shouldn't really have hit that line of code.

 
gour
gour's picture

Joined: 2005-02-10
Posts: 21
Posted: Tue, 2005-02-15 07:21
mindless wrote:
ah, that's a typo.. i fixed it.
update from cvs in a few hours or get tomorrow's nightly snapshot and let us know what the test says.. it shouldn't really have hit that line of code.

OK. Checkout latest code from CVS and run again.

Here are the results:

  • testcodeauditfile_exists(/home/atmarama/web/gallery2/CVS/Entries) fopen(/home/atmarama/web/gallery2/CVS/Entries, r, 0) fgets(Resource id #1035, 4096) fgets(Resource id #1035, 4096) fgets(Resource id #1035, 4096) [1108451628] can't guarantee 30 -- extending! fopen(/home/atmarama/web/gallery2/embed.php, r, 0) filesize(/home/atmarama/web/gallery2/embed.php) fread(Resource id #1036, 25486) fgets(Resource id #1035, 4096) fopen(/home/atmarama/web/gallery2/index.php, r, 0) filesize(/home/atmarama/web/gallery2/index.php) fread(Resource id #1037, 1031) fgets(Resource id #1035, 4096) fopen(/home/atmarama/web/gallery2/init.php, r, 0) filesize(/home/atmarama/web/gallery2/init.php) fread(Resource id #1038, 7366) fgets(Resource id #1035, 4096) fopen(/home/atmarama/web/gallery2/main.php, r, 0) filesize(/home/atmarama/web/gallery2/main.php) fread(Resource id #1039, 17708) fgets(Resource id #1035, 4096) fgets(Resource id #1035, 4096) fclose(Resource id #1035) Yay! We are down to 3 lines longer than 100 characters; update the failure thresholds in this unit test.
  • testhandlerequestwitharchiveextract
    (mysql): SELECT g_id, g_entityType FROM g2_Entity WHERE g_id IN ('6')   
     
     (mysql): SELECT g2_Entity.g_id, g2_Entity.g_creationTimestamp, g2_Entity.g_isLinkable, g2_Entity.g_linkId, g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber, g2_Entity.g_entityType, g2_ChildEntity.g_parentId, g2_FileSystemEntity.g_pathComponent, g2_Item.g_canContainChildren, g2_Item.g_description, g2_Item.g_keywords, g2_Item.g_ownerId, g2_Item.g_summary, g2_Item.g_title, g2_Item.g_viewedSinceTimestamp, g2_Item.g_originationTimestamp, g2_AlbumItem.g_layout, g2_AlbumItem.g_theme, g2_AlbumItem.g_orderBy, g2_AlbumItem.g_orderDirection FROM g2_Entity, g2_ChildEntity, g2_FileSystemEntity, g2_Item, g2_AlbumItem WHERE g2_Entity.g_id IN (6) AND g2_ChildEntity.g_id=g2_Entity.g_id AND g2_FileSystemEntity.g_id=g2_Entity.g_id AND g2_Item.g_id=g2_Entity.g_id AND g2_AlbumItem.g_id=g2_Entity.g_id   
     fopen(/home/atmarama/web/g2data/locks/0/6/6, wb+, 0) flock(Resource id #1039, 5, ) 
     (mysql): SELECT COUNT(g2_ChildEntity.g_id) FROM g2_ChildEntity, g2_FileSystemEntity WHERE g2_ChildEntity.g_parentId = '6' AND g2_FileSystemEntity.g_pathComponent = 'albumtest1440783188' AND g2_ChildEntity.g_id = g2_FileSystemEntity.g_id   
     
     (mysql): update g2_SequenceId set id=LAST_INSERT_ID(id+1);   
    ...
  • testshrinkdimensionstofit
    Mismatch At: [ 0] 113 !== 112 
    array (
      0 => 113,
      1 => 150,
    )
       type:array
    array (
      0 => 112,
      1 => 150,
    )
       type:array

Hope it helps :wink:

Sincerely,
Gour[/]

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-02-15 16:15

please cd to your gallery2 directory and post the output of:
ls CVS
cat CVS/Entries

 
gour
gour's picture

Joined: 2005-02-10
Posts: 21
Posted: Tue, 2005-02-15 16:30
mindless wrote:
please cd to your gallery2 directory and post the output of:
ls CVS
cat CVS/Entries

atmarama@suganaka gallery2 $ ls -l CVS
total 16
-rw-r--r--  1 atmarama users 258 Feb 15 01:45 Entries
-rw-r--r--  1 atmarama users 166 Feb 15 01:46 Entries.Log
-rw-r--r--  1 atmarama users   9 Feb 15 01:45 Repository
-rw-r--r--  1 atmarama users  56 Feb 15 01:45 Root
atmarama@suganaka gallery2 $ cat CVS/Entries
/MANIFEST/1.30/Fri Feb 11 07:34:29 2005//
/README.html/1.65/Fri Feb 11 07:22:16 2005//
/embed.php/1.35/Thu Feb 10 21:54:45 2005//
/index.php/1.9/Fri Jan 28 23:40:00 2005//
/init.php/1.63/Thu Feb 10 21:54:44 2005//
/main.php/1.99/Fri Feb 11 09:27:04 2005//
D

Sincerely,
Gour

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-02-15 22:38

ok, the test isn't scanning subdirectories because they aren't listed in your CVS/Entries file.. don't worry about that test failing. thx.

 
gour
gour's picture

Joined: 2005-02-10
Posts: 21
Posted: Wed, 2005-02-16 08:53
mindless wrote:
ok, the test isn't scanning subdirectories because they aren't listed in your CVS/Entries file.. don't worry about that test failing. thx.

I do not worry, but thought maybe developers could :wink:

Sincerely,
Gour